Forum Moderators: coopster
I am grateful for any help!
Many thanks.
there are some threads in the PHP Library [webmasterworld.com] about MySQL
Basics of extracting data from MySQL using PHP [webmasterworld.com]
Common MySQL Commands [webmasterworld.com]
well the first thing to do is to SELECT the information for that member and load it into a form. Your table hopefully has some unique identifier for each member which is what you will need in your select query.
You then need to allow them to edit the fields you decide should be editable.
They can then submit that form
You need to validate all user entered data
then issue an UPDATE query using that same unique identifier
then if the username ever changes I still retain the id and can track full history even across username changes. Plus queries on a numeric field will be better than a text field.
>> code samples
the thread above "Basics of extracting data from MySQL using PHP" shows how to get the data out of mysql
then you need to display it in a form
just make an html form that has fields for each piece of information you want them to be able to edit. Keep in mind hidden fields for getting data into the form that you don't want them to edit but that you may need when you need to update their information.
when the user submits the changes you need to check every field to make sure it is of the right type, right length etc.
then once you are sure everything is on the up and up you can then issue an UPDATE query to mysql.
take a look at that library link above, there are threads in there about data validation (security) and there is a thread about Peer code review which has some interesting parts.
start with the form
then work on loading the data into it
then worry about updating it