Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Redirect PHP Query to .HTML Page Reply To: Redirect PHP Query to .HTML Page

#151493
__
Participant

Hi, this is my login page. Where should I put the code.

The forum isn’t a great place to share large amounts of code. As you can see, a lot of your code will be mangled and won’t display correctly. You might try pastebin or make a gist on github instead, and then share the link.

To answer your question, in general, something like this should appear as close to the beginning of your script as possible. As @BradMetcalf mentioned, if there is any output to the browser beforehand, the header function won’t work. Since you’re getting the request to log out via $_REQUEST, then it’s probably safe to say that it could be the first thing you do.