Page 1 of 1

Save user input to the website?

Posted: Sun Dec 05, 2010 10:03 pm
by stuntpenguin007
I have a textbox and a submit button in an html form. I want to make it so that when a user enters text and clicks submit, it saves it to the website, and other people can see what they wrote. right now I have:

Code: Select all

<?PHP $input = $_POST['input']; ?>
1. <?PHP echo $input ?>
That shows up as "1. [whatever the user typed here]" locally, but how can I make it so other people on different computers can see the submitted text?

Re: Save user input to the website?

Posted: Mon Dec 06, 2010 12:38 am
by Mince
Well you would have to save it into a database and then echo it from there.

Re: Save user input to the website?

Posted: Mon Dec 06, 2010 11:50 pm
by matt1234
It needs to be stored on the server somehow for the public to view. You can use a database and store the values there or some sort of file that you read in and update each time the form is submitted. It depends on how complicated the project is.