Forwarding a page

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
nick2price
Forum Newbie
Posts: 18
Joined: Fri Nov 13, 2009 5:49 pm

Forwarding a page

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Forwarding a page

Post 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?
nick2price
Forum Newbie
Posts: 18
Joined: Fri Nov 13, 2009 5:49 pm

Re: Forwarding a page

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Forwarding a page

Post 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?
Post Reply