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? Quote 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) Quote 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>"; } Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.