After creating a short form in php how do I go about uploading the information to a file in my server and then creating a html file out of it and publishing on line. For example in this form: <form action="process.php" method="post"> <input type="text" name="thebox" value="name" size="20"><p> <textarea name="message" rows="7" cols="22"> Please write your message here. </textarea> <p> <input type="submit" value="Submit"> <p> <form action="process.php" method="post"> Form elements and formatting etc. </form> PHP: how do I get the information stored in process.php and generate a new html file with the: 1. text are name & text area message. I am building a small classified script and I need some help, it has got to be very simple. you fill out the information in the form and it will generate a html file with the information that you entered in the form then the new classified will be posted in the main page of my site. Thanks guys for your help in advance!
If you make a script like this, you need to use some very good cleaning of whatever input the user puts into the message input field. If you straight create a file with that input without thoroughly removing any potentially dangerous script, anyone could create a page with whatever php script they want in it and easily gain access to your server. Also, for the script to create files, there has to be fairly open permissions on the folder that the files are being created in, which is another security concern in itself. You would be better off adding the information to a database, and then pulling the information out of the database as needed.