24
Jul/081
Jul/081
PHP header redirect
Something to remember when using header location to redirect a page from a server-side script. The output is redirected to the new page, but the logic on the original file will continue to execute. Therefore, if there are database calls the changes to the data will still be made even though a header redirect was issued.
To solve the problem, make sure to issue an exit() command after a header location command.
Comments (1)
Trackbacks (0) ( subscribe to comments on this post )
Leave a comment
No trackbacks yet.
8:43 am on January 13th, 2009
I wasn’t aware of that, thanks