Re: PHP redirect script



sheldonlg wrote:
Jerry Stuckle wrote:
Hugh Oxford wrote:
Xafke wrote:
Hi..

I've searched hours on this, but found nothing. I need a script that
redirect a user by it's input. For example a users types 'Google' in
the form, than it will redirect to lets say 'http://www.google.net'
Or 'A NAME' redirect to 'http://www.anything.biz'

I like it in PHP and MySQL, because put it all in a file slows my
server down..


Also, I would like a free script.

Thanks!

header('Location: $location');

That will try to redirect the user to http://$location. I think you wanted double quotes around it.


... which is why I always write these as
header("Location: " . $location);

Never a confusion as to what is or is not expanded when doing it my way.
I think you are confusing 'your' way with 'my' way since I use the same syntax.....but go ahead and continue to use it, I won't mind.

Scotty
.



Relevant Pages

  • Re: PHP redirect script
    ... redirect a user by it's input. ... I would like a free script. ... If you're going to concatenate here, at least use single quotes to avoid unnecessarily invoking variable interpolation. ... As for confusion when actually making use of variable interpolation, yes, I can understand. ...
    (comp.lang.php)
  • PHP redirect script
    ... redirect a user by it's input. ... For example a users types 'Google' in ... I would like a free script. ...
    (comp.lang.php)
  • Re: PHP redirect script
    ... I need a script that ... redirect a user by it's input. ... For example a users types 'Google' in ...
    (comp.lang.php)
  • Re: PHP redirect script
    ... Why would "Google" go to google.net rather than google.com? ... redirect a user by it's input. ... For example a users types 'Google' in ... server down.. ...
    (comp.lang.php)
  • Re: PHP redirect script
    ... redirect a user by it's input. ... Variable interpolation only occurs within double quoted string ... As for confusion when actually making ...
    (comp.lang.php)