peter-cooper
asked on
How do i use the await event in php echo
Hello
I have a script that echoes to a location at the end of a mysql query. I need to set a time before the function executes and found that the javascript event is 'await. I have tried in my code, but all I get is 500 error. Can someone please help with this. Thanks
I have a script that echoes to a location at the end of a mysql query. I need to set a time before the function executes and found that the javascript event is 'await. I have tried in my code, but all I get is 500 error. Can someone please help with this. Thanks
echo "<script language=\"JavaScript\">\n";
echo 'alert("SUCCESS. You will now be redirected to the boxes requests area.");';
echo 'await sleep(4000)';
echo 'location.href = "boxdest.php"';
echo "</script>";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome! :)
The corresponding functions in PHP are
http://php.net/manual/en/function.sleep.php - for long delays
http://php.net/manual/en/function.usleep.php - for short delays
http://php.net/manual/en/function.sleep.php - for long delays
http://php.net/manual/en/function.usleep.php - for short delays
ASKER