Tabs on Edit Profile page

By gregThomas - February 11, 2016

Hi Greg,

What method are you using to break up the page into tabs? Is it a seperate PHP file for each one? If so, you need to remove the error checking at the top of the page that isn't relevant to the current tab. For example, the error checking for the name is:

    if     (!@$_REQUEST['fullname'])            { $errorsAndAlerts .= "You must enter your full name!<br/>\n"; }

So you'd need to remove that line to stop error checking system for looking for the users name.

If the tabs are all in the same PHP file, and are sharing the same code to update the fields, you'd need to update the hidden save variable in each form so that it's unique:

  <input type="hidden" name="save" value="1" />

So the first form could have a name of save, the second of save2, the third of save3, etc.

Then you'd need to duplicate and update the save code at the top of the file for each form. The code that saves and updates the user's details is found in this if statement:

  ### Update User Profile
  if (@$_POST['save']) {

Let me know if you have any questions.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gversion - February 11, 2016

Thanks, Greg! All working now.

Regards,

Greg