Jump to content

bringing array variable over to another page


clown[NOR]

Recommended Posts

ok basicly what i want to do is the following.

In my login script i look for errors such as empty fields etc. now if any errors were found i redirect to errors.php...

I want to bringthe array $errors with me from do_login.php to errors.php to show the user what went wrong during the login...

 

how can I do this without using the $_GET[]; ?

In general people seem to be redirect-happy.

 

Redirects take extra time (over just putting all of your related code on one page) because the header must be sent to the browser, the browser must stop or finish what it was doing, send the http request back to the server, the server must see the request, do the disk i/o to fetch the new page, invoke the php language engine to parse and execute it, then output any content back to the browser.

 

If you just put all related code on one page, all of that is either skipped or combined for any additional functionality and you would just continue executing any code that uses the results produced earlier on that same page.

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.