I have written a very straightforward user login script. Once the user
successfully logs in, I would like my PHP script to take him directly to the
home page. I know this sounds simple, but the only solution I've found is a
function called do_html_url() from Welling and Thompson's book (see
] Howto go directly to a URL?
I have written a very straightforward user login script. Once the user
successfully logs in, I would like my PHP script to take him directly to
the
home page. I know this sounds simple, but the only solution I've found is
a
function called do_html_url() from
Michael T. Peterson mailto:[EMAIL PROTECTED]
on Friday, February 13, 2004 1:03 PM said:
I have written a very straightforward user login script. Once the
user successfully logs in, I would like my PHP script to take him
directly to the home page.
[snip]
Can I avoid that intermediate
snip
Can I avoid that intermediate step, somehow? When my script logs in
the
user, how to I write the code that dispatches directly to the home
page?
/snip
Have you tried a redirect?
http://www.php.net/header
?php
header(Location: http://www.example.com/;); /* Redirect browser */
/* Make
Alex Hogan mailto:[EMAIL PROTECTED]
on Friday, February 13, 2004 1:10 PM said:
if($login == successful){
$url = yourin.php;
}
else{
$url = tryagain.php:
}
header(Location: $url);
don't forget the rest of the url and don't forget to exit like matt
said...
i suggest
5 matches
Mail list logo