How would I make function like on pastebin where you can post things and also view peoples posts
How would I make function like on pastebin where you can post things and also view peoples posts
Hello,
If you're asking such a basic question I would assume you're not yet well versed enough to tackle such a thing; perhaps learn the basics first? That being said I will do my best to give you a base idea of how a website like Pastebin would be constructed (assuming that is what you mean).
Basic site design would be done in HTML / CSS / JavaScript and whatever else you fancy to make it more awesome, I'm sure Google would be more than happy to help you learn how to create websites using those languages. With that out the way the more tricky part would be the server-side, which as you've not stated any desired language I will throw PHP out there as it's what everyone seems to be going to learn first these days.
A client-side form would be used to submit the data to a PHP script which then stores the data in a database. Obviously the biggest rule of accepting data from a client applies here if you plan to handle code; never trust user input - sanitize it. There are hundreds of guides on the internet explaining how to sanitize user input from SQL injections and such, it would do you good to understand how they work!
Showing what people have posted is simple, just use PHP once again to grab the posts out of the database and render them as HTML, all very simple stuff when you know the basics of each of the languages, I'm sure you can figure it out from here. Of course, this is a VERY base concept, and by that I mean -very- basic.![]()
To be honest I was just asking for the code but thanks![]()
Not a website just the script for the posting but okay
All right.
<?php
$data['title'] = $_POST['title'];
$data['code'] = $_POST['code'];
$this->db->insert("posts", $data);
echo 'Posting Done!';
LOOOOL i hope you understand .. and you would have more sense on listening Reneyi