Tech Blog Using technology to help your business

24Jul/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.

Filed under: Coding Leave a comment
Comments (1) Trackbacks (0)
  1. I wasn’t aware of that, thanks :)


Leave a comment

No trackbacks yet.

Plugin from the creators of Brindes :: More at Plulz Wordpress Plugins