Jump to content

Php / MySQL to update a member profile page


eagle1771

Recommended Posts

I am a struggling 'newbie' programmer and could really use some help. I know I am probably making some basic mistakes and I think I may have some redundant code in here. I have reduced the original file size down to the basics - from nearly 2000 lines of code to about 300.

 

The purpose of this Php web page is as follows:

 

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

 

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.

 

Thanks in advance for any light you can shed on my efforts.

 

I am attaching the code as a text file.

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.