thara Posted November 4, 2011 Author Share Posted November 4, 2011 your first code working in first time browser load the page. after that it is not working. that download box never come again to download a song. Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285047 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 second code is not working. there is a error when I open the page Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285048 Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 4, 2011 Share Posted November 4, 2011 i edited the script above, try this <?php if (!isset( $_POST[ 'submitted5' ])) { $expire=time()-60*60*24*30; setcookie("downloaded", "",$expire); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285049 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 I delete cookies manually from the browser and run page again then it worked first time and came the earlier problem again. (I used your first code pinch) Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285050 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 that code pinch also same to earlier one... <?php if (!isset( $_POST[ 'submitted5' ])) { $expire=time()-60*60*24*30; setcookie("downloaded", "",$expire); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285052 Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 4, 2011 Share Posted November 4, 2011 Yah,cause i re-dited it. make sure your code have the exact thing. Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285054 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 yes dear, I did exactly as you said.. Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285058 Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 4, 2011 Share Posted November 4, 2011 What are the errors? Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285060 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 script work in the first time. after that it is not working... Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285062 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 I used this code if( isset( $_POST ['download'] ) && isset( $_POST ['download'] ) == 'Download' && !isset($_COOKIE["downloaded"])) { $expire=time()+60*60*24*30; setcookie("downloaded", "yes", $expire); Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285063 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 I delete cookies manually from the browser and run page again then it worked first time and came the earlier problem again. (I used your first code pinch) Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285064 Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 4, 2011 Share Posted November 4, 2011 U need the first code and the second code together Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285065 Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 4, 2011 Share Posted November 4, 2011 Let me get some. Will help you out when i wake up Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285067 Share on other sites More sharing options...
thara Posted November 4, 2011 Author Share Posted November 4, 2011 Thank you very much my dear... Now my problem has solve.... it is working properly. that is I expected way.... Thank You very much once again So How can I help you..???? Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285072 Share on other sites More sharing options...
ZulfadlyAshBurn Posted November 5, 2011 Share Posted November 5, 2011 Sorry, but what again? Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285244 Share on other sites More sharing options...
thara Posted November 6, 2011 Author Share Posted November 6, 2011 Hi.. dear. In my download page, a user click on download button the download box appears above the button. but when that download box is appearing the downloading is not starting automatically. definitely a user must click on the link call "If your download doesn't start automatically. CLICK HERE." appear on that download box to download a particular song. So dear, Can I make it to start downloading automatically while that download box also appearing. Thanks in Advance for any help Quote Link to comment https://forums.phpfreaks.com/topic/250429-can-i-cancel-a-form-automatically-after-successfully-submitted/page/2/#findComment-1285390 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.