you're assigning, not checking for equality...use two ='s
-Original Message-
From: Martin [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 04, 2001 12:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Am i crazy?
Did I forget everything in a few months?
if ($name='admin') {
Jack Dempsey wrote:
you're assigning, not checking for equality...use two ='s
Still not redirecting ...
Martin S
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators,
what happens? are you sure $name really equal's admin?
if you change header to echo $MYPATH does that work?
-Original Message-
From: Martin [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 04, 2001 12:54 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Am i crazy?
Jack Dempsey wrote
It has to do with the $name variable, if you've fixed the code to check for
equality instead of setting the variable:
if ($name=='admin') {
Echo $name and make sure that it is actually getting set..
Also make sure your header information is before html.. let's see.. yeah
that's about all I can
Jack Dempsey wrote:
what happens?
if ($name == admin) {
echo $name;
header(Location: $MYPATH/admin.php);
}
Displays admin on the page where the redirect is from (switch.php).
Without the echo statement I just get a blank
Richard Baskett wrote:
It has to do with the $name variable, if you've fixed the code to check
for equality instead of setting the variable:
if ($name=='admin') {
Echo $name and make sure that it is actually getting set..
Yes.
Also make sure your header information is before html..
it
turn error reporting down to its lowest level.
After using a header redirect often comment to put exit;
HTH,Tom
- Original Message -
From: Martin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 04, 2001 8:24 PM
Subject: Re: [PHP] Am i crazy?
Richard Baskett wrote
Tom Carter wrote:
well when you were using echo $name to test then you were outputting html,
hence no redirect...
I've tried both w/ and w/o the echo. No difference.
if your php is set up in such a way as to suppress
errors then you wouldn't have been warned about it..
No, nothing is
Try putting exit; right after the header() function...
-JAson Garber
IonZoft.com
At 06:54 PM 11/4/2001 +0100, Martin wrote:
Jack Dempsey wrote:
you're assigning, not checking for equality...use two ='s
Still not redirecting ...
Martin S
--
PHP General Mailing List (http://www.php.net/)
To
9 matches
Mail list logo