i rather new to PHP so any help for my next “project” will be appreciated. I would like to make a form on my website and when the form is submited i would like to be able to log in my website as the administrator and see the information submited via the form.
How can i do that? Are there any tutorials i can watch?
There are many, many ways of doing this, fortunately
Being new-ish to PHP, it would be beneficial to your learning experience to try as many approaches as you can think of.
Here are the important steps:
User sends form
[list]
Verify that all of the required information is there and is valid. If not, send the user back to the form with their previous values filled in and an error message.
Have some kind of data storage system. This could be a MySQL database, which is the most common approach. However, XML and text-file storage are both viable solutions.
Escape your data so that it doesn’t harm your storage. For example, using MySQL you’d use MySQL_Real_Escape_String. For a flat-file storage you’d escape any tabs and newlines, and with XML I’d recommend a library which does this for you.
Save the data and show a final page to the user.
[*]When you view the data, simply open the data storage solution as you normally would and display it in the page.
[/list]