redarrow Posted July 2, 2006 Share Posted July 2, 2006 i thort this but dosen work first show an animated pic then echo message.<?phpsleep(2);$img="<img src='images/x.gif'</img>";echo $img;sleep(5);if($_GET['cmd']==delete){echo "delete database entry";}else{echo "no not there ok!";}?> Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/ Share on other sites More sharing options...
wildteen88 Posted July 2, 2006 Share Posted July 2, 2006 No this is not how sleep works. Sleep only stops the PHP Intepreter for the number of secounds defined. It does not pause, print something, then pause again and print something else. Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/#findComment-51989 Share on other sites More sharing options...
redarrow Posted July 2, 2006 Author Share Posted July 2, 2006 so is that inposale then print echo print echo Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/#findComment-51997 Share on other sites More sharing options...
trq Posted July 2, 2006 Share Posted July 2, 2006 You can try toying around with the output buffer but its highly browser specific and not really worth your while attempting.This sort of thing would be best handled by javascript / ajax. Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/#findComment-52015 Share on other sites More sharing options...
redarrow Posted July 2, 2006 Author Share Posted July 2, 2006 can you give a quick example ajax way please chers. Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/#findComment-52017 Share on other sites More sharing options...
trq Posted July 2, 2006 Share Posted July 2, 2006 Would'nt really need to be ajax unless your retreiving data from a database, pure javascript would do, and there is a whole other forum for such questions. Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/#findComment-52023 Share on other sites More sharing options...
Drumminxx Posted July 2, 2006 Share Posted July 2, 2006 try looking up javascript DHTMLhere is a good starthttp://www.golivecentral.com/pages/txttut/jstut/innerhtml.shtml Quote Link to comment https://forums.phpfreaks.com/topic/13451-sleep-controll/#findComment-52026 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.