Re: RE: Am i crazy?
| From: | Mirek Novak | Date: | Mon, 05 Nov 2001 06:43:18 +0000 |
| Subject: | Re: RE: Am i crazy? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73450@lists.php.net to get a copy of this message | ||
1. ($name='admin') ... it's ALWAYS true :o), if u want to compare, try
'=='
2. try to add exit(); after redirect.
HTH
Mirek,
---
ArsenKirillov wrote:
> Why not
> if (file_exists($fname="$MYPATH/admin.php") && $name='admin'))
> header
> ("Location: ".$fname) ;else echo "Trouble with $fname";
>
> > -----Original Message-----
> > From: Martin [mailto:chimbis@bahnhof.se]
> > Sent: Sunday, November 04, 2001 7:49 PM
> > To: php-general@lists.php.net
> > Subject: Am i crazy?
> >
> >
> > Did I forget everything in a few months?
> > if ($name='admin') {
> > header("Location: $MYPATH/admin.php");
> > }
> >
> > Doesn't. That is it doesn't redirect to whatever $MYPATH/admin.php
> > translates to. Doing an echo $MYPATH directly after the line
> > shows that the
> > path is interpreted correctly - and the file exists (I checked). And the
> > $name is correct - echo $name gives admin. And neither does the php.net
> > example work ...
> >
> > if ($name='admin') {
> > header("Location: http://www.php.net/");
> > }
> >
> > doesn't redirect to php.net.
> >
> > *sigh*
> >
> > Martin
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net