Ninjakreborn Posted April 12, 2007 Share Posted April 12, 2007 I have seen Thank you for submitting the form ... Redirecting Or Thank you for submitting the form ... Redirecting in 5 (4, 3, 2, 1, 0, redirect) So..., how do I do that. I know how to redirect, it's just I don't know how to do it like that. I have noticed lately, that when I do a form you are able to submit over, and over, and over again, which causes problems, and I finally found a client who pointed that out. I do that all the time, I need a way to do it, to where when the form actually submits, something happens to prevent it from submitting again. So the redirect idea came to mind, how do I get that to work, and what other options do I have to prevent the continual re-submittal of the information. Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/ Share on other sites More sharing options...
Lumio Posted April 12, 2007 Share Posted April 12, 2007 You can do that with JavaScript or with a Meta-Tag Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227565 Share on other sites More sharing options...
Orio Posted April 12, 2007 Share Posted April 12, 2007 Use javascript to disable the button after a click Orio. Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227567 Share on other sites More sharing options...
Ninjakreborn Posted April 12, 2007 Author Share Posted April 12, 2007 http://www.tizag.com/javascriptT/javascriptredirect.php Ok, I have the Java script Bible, which has a lot. is there an on line directory of in-build Java Script functions, that explain the different one's, because I wasn't even aware that the setTimeout() function existed. Again, this post has veered into Java Script, instead of PHP. I originally was thinking some way with output buffering to delay the location header or something, thanks for the feedback. Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227584 Share on other sites More sharing options...
JayLewis Posted April 12, 2007 Share Posted April 12, 2007 <meta http-equiv="refresh" content="3;url=http://www.yoursite.com/ext"> <? echo "thanks for signing the form"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227589 Share on other sites More sharing options...
suzzane2020 Posted April 12, 2007 Share Posted April 12, 2007 <SCRIPT language="JavaScript"> function redirect() { alert("thank You") window.location="http://someplace.com"; } Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227603 Share on other sites More sharing options...
boo_lolly Posted April 12, 2007 Share Posted April 12, 2007 i use an example like jay's often. Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227623 Share on other sites More sharing options...
Ninjakreborn Posted April 12, 2007 Author Share Posted April 12, 2007 Yes, I came up with something and it works perfectly. I created <script type="text/javascript"> <!-- function delayer(){ window.location = "cymember.php"; } //--> </script> I also can modify that, to put an argument there for the url if I need to change that around. From there I use echo "Updated Successfully.<br />"; echo "Redirecting...."; ?> <script type="text/javascript"> setTimeout('delayer()', 3500) </script> and so far it seems to be working flawlessly. Thanks for all the feedback, if he ends up liking the way this works, I think I will use this in my future projects as well. More user friendly that way anyway. Quote Link to comment https://forums.phpfreaks.com/topic/46713-solved-thanks-then-redirect/#findComment-227637 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.