| | |
Wait some time and after that redirect another Location
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
You can use sleep function before header('Location:http://xyz.com'). If just microsecond, then use usleep.
Ecommerce-Web-Store.com Building Your e-Business.
You may also want to have a holding page which has a meta refresh on it. This is a strategy used on forums and a great many sites.
•
•
•
•
Hi,
I am using this code to redirecting another page. But still, it is not working.
---------------------------------------------
<?php
if(!$sql){
echo 'There has been an Error for Submitting your request. Please Contact the Web Master.';
}else{
echo "Hello <u><b>".$name."</b></u>";
echo '<br/><hr>Thank you';
echo '<br/><br/>Your Request is under process. Our Representative will get in touch with you.';
sleep(5);
echo '<script><!-- window.location= "http://www.widecomindia.com/home.html" //--></script>';
// header("Location: http://www.widecomindia.com/home.html");
}
--------------------------------------------
if u have any example or suggession, please given reply.
Rgds.
Dheeraj
the problem is that you're using window.location not meta refresh. Search google. There are plenty of sites showing how to do it.
•
•
•
•
<?php
if(!$sql){
echo 'There has been an Error for Submitting your request. Please Contact the Web Master.';
}else{
echo "Hello <u><b>".$name."</b></u>";
echo '<br/><hr>Thank you';
echo '<br/><br/>Your Request is under process. Our Representative will get in touch with you.';
sleep(5);
echo '<script><!-- window.location= "http://www.widecomindia.com/home.html" //--></script>';
// header("Location: http://www.widecomindia.com/home.html");
}
This is limited by the http protocol.
You will have to use javascript, or the meta refresh method.
JS:
<script>
<!--
timeout = '5000'; // milliseconds/1000th of a sec
window.onload = setTimeout(myRedirect, timeout); // ensure we load the whole page
function myRedirect() {
window.location = "http://www.widecomindia.com/home.html";
}
//-->
</script>
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
Similar Threads
- form submit redirect help, please (HTML and CSS)
- Execute Multiple Things At One Time (Visual Basic 4 / 5 / 6)
- Best way to build a LAN? (Networking Hardware Configuration)
- 2 questions: making a program wait, simulating the enter button (C#)
- php mail form - need to redirect to new page (PHP)
- WindowsXP makes me wait! (Windows NT / 2000 / XP)
- Is Redirect Bad for Business? (Search Engine Optimization)
- recording date and time a link is clicked (ASP.NET)
Other Threads in the PHP Forum
- Previous Thread: uploading a picture
- Next Thread: comparing 2 variable
| Thread Tools | Search this Thread |
.htaccess action ajax apache api array auto beginner binary bounce broken cakephp checkbox class cms code cron curl database date display dynamic echo email error errorlog file files folder form format forms function functions google href htaccess html image include insert integration interactive ip java javascript joomla limit link login loop mail malfunctioning masterthesis menu mlm mod_rewrite multiple mysql nodes oop paypal pdf php popup problem query radio ram random recursion reference regex remote return script search server sessions sms soap source space sql syntax system table tutorial unset update upload url validation validator variable video web websitecontactform xml youtube






