March 11th, 2013, 09:01 PM
Please excuse the simplicity and likely stupidity of this question, but I can't figure it out anywhere, so I'll ask.
What I want to do is make a php script that will automatically redirect the user to a different page if certain qualifications are met. The problem is, I can't find a command to automatically initiate a link besides when the page initiates. How would I do that?
March 11th, 2013, 09:08 PM
"Initiate a link"?
A redirection is as simple as
but you must not have outputted anything by that point.
March 11th, 2013, 09:55 PM
To expand on requnix, you can have PHP code to do the evaluation before header(); Just not any code that generates HTML output.
March 12th, 2013, 05:00 AM
not even a "space"
Originally Posted by acray
March 12th, 2013, 08:44 AM
Not even necessarily any CODE before the header(). If you have an include file that ends in "?> " then you'll get those 2 spaces in your output and header() won't work.
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.