Experienced PHP programmers know that there are various ways of structuring pages within a website. Years ago, a common approach was to place every major page into a separate PHP file, and within the navigation menus simply link directly to the various pages. Nowadays, most sites use a central control file -- typically index.php -- and use GET variables to distinguish which page within the system the control file should present to the visitor. (The control file might pull the page content from functions, HTML files, or, as is used in the better CMSs, a database.)<p>For instance, a "Contact" navigation menu item could be linked to "index.php?page=contact". (For this discussion, let's ignore search-engine-friendly URLs.)<p>What is the best way to pass the visitor from a completed form page to a destination page? Let's say that after visitors to our site successfully complete the contact form, we want to send them to our privacy policy page. So when they are completing the form, the address in the browser is "index.php?page=contact". After they click the Submit button, we process the input, verify that it is all correct, and now want to send them to the privacy page, whose link in the navigation menu is "index.php?page=privacy". How best to do that?<p>One possible approach is to use the PHP function header(). But if you are stepping through the contact page code, using a PHP IDE, it will step to the line of code after the header() call, without navigating to the privacy page. (There may be an IDE out there that does what we want, but I have yet to find one. Even if it did, all variables set in the contact page code are lost.)<p>A second possible approach is to have the form processing code set a variable to indicate what page to go to next (e.g., $page = 'privacy'), which would cause the privacy page's contents to be displayed next. But the address in the browser still indicates that the visitor is on the contact page. They may send that address to someone else, as a link to the privacy page, which would be confusing to the recipient.<p>Any suggestions?