plodos Posted November 23, 2008 Share Posted November 23, 2008 else { echo "Error : The email address ['.$email.'] and name ['.$name.'] already exists in our database."; //after 5 seconds //when the user read the sentence header("Location: http://aaa.com"); } how can I put the 5 seconds delay? after user will go another page i didnt apply sleep(); function from http://tr2.php.net/sleep or could you give me another solution method which is better to sleep() Link to comment https://forums.phpfreaks.com/topic/133879-solved-php-sleep-function/ Share on other sites More sharing options...
thebadbad Posted November 23, 2008 Share Posted November 23, 2008 Normally a meta refresh is used for that kind of a redirect. Between the <head> tags: <meta http-equiv="refresh" content="5;url=http://aaa.com" /> Link to comment https://forums.phpfreaks.com/topic/133879-solved-php-sleep-function/#findComment-696911 Share on other sites More sharing options...
ozby Posted November 23, 2008 Share Posted November 23, 2008 you can do it quickly with this; header("refresh: 5; url=http://aaa.com"); Link to comment https://forums.phpfreaks.com/topic/133879-solved-php-sleep-function/#findComment-696912 Share on other sites More sharing options...
plodos Posted November 23, 2008 Author Share Posted November 23, 2008 thank you Link to comment https://forums.phpfreaks.com/topic/133879-solved-php-sleep-function/#findComment-696913 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.