eagle1771 Posted March 2, 2009 Share Posted March 2, 2009 I have been working on a rather large (58k) php web page to allow users of our web site to update their own user profile. I believe that I am close to having this working but I must have some structural errors as I am unable to get the error checking to work and to get the script to be stable and give the expected results for any user. The script does the following: 1) Check for properly logged in user 2) Set a $user variable based on the session username value 3) Query the db for logged in user info and assign values to the variables for populating the form fields 4) Display the update form with current db info allowing user to change and click update button 5) Test for errors and redisplay form with errors flagged for correction 6) Query updated db and display (echo) results 7) Provide a button to return to the form for further updating Here is a link to my profile as required by the rules for this forum: http://www.phpfreaks.com/forums/index.php?action=profile;u=56476 As it stands right now, if I comment out the error checking code which is for the excellent validation script at: http://www.benjaminkeen.com/software/php_validation/ the script works but of course works even when errors are made in the data entry. With the error checking left in, when the form is submitted it goes to a blank black screen (background color) and does not update the db. If you want me to, I can remove everything except the relevant code to make the attached file much smaller and easier to check. I would really appreciate any help you can give as I have been working on this for about three weeks and am beginning to lose track of what I have done. I think I am going in circles. Thank you for taking a look. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/147505-php-mysql-page-to-update-users-profile/ Share on other sites More sharing options...
Recommended Posts