Page 1 of 1

Forwarding a page

Posted: Sun Nov 15, 2009 8:54 pm
by nick2price
Hi. So I am using php for my register and login page. If they try to register with an exsisting login name in the database, I print a message to them, but then I want to redirect them somewhere. I am doing

Code: Select all

else
{
    $login= 'This login name already exists.';
    header("Location: http://localhost/shop.html");
}
But that just redirects them to quickly, without time to see the message. How can I put a delay on the redirect, or can anyone suggest a better option?

cheers

Re: Forwarding a page

Posted: Sun Nov 15, 2009 9:58 pm
by josh
Wrong forum section. You'll find what you want with either meta redirect tags or javascript. You could start by viewing source on these forums after posting a message perhaps?

Re: Forwarding a page

Posted: Mon Nov 16, 2009 8:47 am
by nick2price
ok, Maybe you can tell me this. In my code in my op, I replace the header with a hyperlink. Why would the hyperlink be displayed before the variable? How would I get it to say
$login= 'This login name already exists.';
And then a new line, and then
Hyperlink
?

cheers

Re: Forwarding a page

Posted: Mon Nov 16, 2009 9:21 am
by josh
nick2price wrote: Why would the hyperlink be displayed before the variable?
Why would I know if you didn't post the revised code?