tags:

views:

70

answers:

4

I am using php 5+,Windows, Apache server.

I have a registration page createaccount.php on whose successful registration I want to show the createaccountsuccess.php page for few seconds only then proceeding to homepage hompage.php by itself..

Like this:

Registration Page----> Successfull Registration------> Home page
                   (Wait for 3 seconds on this page)

How Can I do this? please help me....

+2  A: 

Place this between the <HEAD> and </HEAD> tags of your HTML code for createaccountsuccess.php:

<meta HTTP-EQUIV="REFRESH" content="3; url=http://hompage.php"&gt;

The above HTML redirect code will redirect your visitors to hompage.php (but I think you want homepage.php :-) after 3 seconds.

jschulenklopper
+2  A: 

These "few second messages" are usability fault. You cannot be sure it was read. And it's annoying. Just redirect user right to the user's details page where he can learn that registration was successful and can review his settings.

Col. Shrapnel
@OM it become even more annoying :) Look around: nobody uses it nowadays. It's last century technology. If user have to stay on the same page, we use AJAX both to submit and inform. If user going to go to another page - just redirect them.
Col. Shrapnel
+2  A: 

Use a HTML-Meta-tag in the html-header

<meta http-equiv="refresh" content="3;url=createaccountsuccess.php">
Flexx
+1  A: 

Javascript's setTimeout can be of help. But the better solution is one of those:

  • let user stay at that intermediate page and decide to leave it on himself
  • embed "success" message in the home page (use cookies for that)
yk4ever