nobodyk Posted August 8, 2010 Share Posted August 8, 2010 When ever I put it on my php page I get a blank page. I haven't been able to call the function yet. function waitmsg($dmsg,$whereto) { echo "<script language='javascript'>setTimeout("location.href='http://".$site_url."/".$whereto."'",5);</script>"; echo "<br><br><br><div align='center'>".$dmsg."</div><br>"; echo "<div align='center'>Please wait while you're automatically redirect, If you are not forwarded within 5 seconds, please click <a href='http://".$site_url."/".$dmsg.">here</a>.</div><br><br><br>"; } Any ideas? Link to comment https://forums.phpfreaks.com/topic/210166-whats-wrong-with-this-function/ Share on other sites More sharing options...
sinista Posted August 8, 2010 Share Posted August 8, 2010 first echo is wrong if you start with a " and then put " in the string it thinks the string is finished (if that makes sense) Link to comment https://forums.phpfreaks.com/topic/210166-whats-wrong-with-this-function/#findComment-1096785 Share on other sites More sharing options...
jcbones Posted August 9, 2010 Share Posted August 9, 2010 Get you a good editor with a syntax highlighter, and you would instantly recognize this problem. function waitmsg($dmsg,$whereto) { echo "<script language='javascript'>setTimeout(\"location.href='http://".$site_url."/".$whereto."',5);</script>"; echo "<br><br><br><div align='center'>".$dmsg."</div><br>"; echo "<div align='center'>Please wait while you're automatically redirect, If you are not forwarded within 5 seconds, please click <a href='http://".$site_url."/".$dmsg.">here</a>.</div><br><br><br>"; } Link to comment https://forums.phpfreaks.com/topic/210166-whats-wrong-with-this-function/#findComment-1096797 Share on other sites More sharing options...
nobodyk Posted August 9, 2010 Author Share Posted August 9, 2010 Can you recommend one? Also, I fix the problem. It was a syntax problem Link to comment https://forums.phpfreaks.com/topic/210166-whats-wrong-with-this-function/#findComment-1096804 Share on other sites More sharing options...
trq Posted August 9, 2010 Share Posted August 9, 2010 Can you recommend one? See here. Link to comment https://forums.phpfreaks.com/topic/210166-whats-wrong-with-this-function/#findComment-1096810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.