Jump to content

[SOLVED] Retain variables after form submit redirect HELP!!


xander85

Recommended Posts

Hey All,

 

This is problem either a stupid or very easy question, any suggestions are greatly apreciated.

I have a section on my website where only users that are "logged in" can view and I'm using the following syntax at the top of verify that they are logged in and that they can only view their profile:

 

if((!$session->logged_in) || (($session->num != $_GET[num]) && ($session->num != $_POST[num])))
{
header("Location:websiteaddresshere");
exit;
}

 

This works great. The get to your account you have to be logged in and use the user: account.php?num=# or else you are redirected.

 

My problem is as follows. I have a section to edit your account details that uses the same code as above.

However, once you submit the form on accountedit.php, it redirects to the main website address instead of displaying some text saying the edit worked successfully.

 

How do I submit a form and add "?num=$usernum" to the end of the website url so they aren't redirected?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.