xsubs Posted November 1, 2007 Share Posted November 1, 2007 I made some security code, which thanks god works well. I have only one problem. I want that if the user succeed and entered the right security code, he will be redirect to Download.php?id=SOMEID. Download.php literally downloads a file, and it works fine, but when i redirect the user from the security code to DOWNLOAD.PHP, it requires POPUP BLOCKER something. Here is my code: <?php if (!$_SESSION['AiSC'] <= 5) { unset($_SESSION['AiSC']); ?> <br> <form action="" method="post" name="SecurityCodeForm" enctype="multipart/form-data"> <div align="center" style="font-family:arial;font-weight:bold;font-size:12px;color:black;direction:rtl;display:none;" class="Security" id="div1"> הקלד בבקשה את הטקסט שבתיבה, ולאחר מכן לחץ על "הורד תרגום".<br> <table border="0" celspacing="0" style="height:45;"> <tr> <td> <img src="<?=createImage();?>"> </td> <td> <input type="text" name="code" value="<?=$ValuAiSC;?>" style="font-family:arialbd;font-size:20px;font-color:black;width:150px;height:45px;direction:ltr;vertical-align:baseline;"> </td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" name="Verify" style="font-family:arialbd;font-size:12px;font-color:black;height:25px;direction:ltr;vertical-align:baseline;" class="InputButton" value="(הורד תרגום (לחץ לחיצה עם העכבר"> </table> </form> </div> <br> <? } if (isset($_POST['Verify'])) { if ($_POST['code'] == $AiSC || $_SESSION['AiSC']) { unlink("pictures/".$_SESSION['AiSC']); $_SESSION['AiSC'] = 1; header("Location: Download.php?id=1"); } else { echo "<script language=\"JavaScript\">alert(\"קוד האבטחה שהקשת אינו זהה לקוד המקורי.\");</script>"; } } ?> The broblematic line is: " header("Location: Download.php?id=1"); " Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/75622-problem-with-file-download/ Share on other sites More sharing options...
Wuhtzu Posted November 1, 2007 Share Posted November 1, 2007 but when i redirect the user from the security code to DOWNLOAD.PHP, it requires POPUP BLOCKER something. What? Quote Link to comment https://forums.phpfreaks.com/topic/75622-problem-with-file-download/#findComment-382636 Share on other sites More sharing options...
xsubs Posted November 1, 2007 Author Share Posted November 1, 2007 Ok, i didn't explain my self well. When you enter to DOWNLOAD.PHP, it asks you if you want to download the certain file. (Download page, which means, downloads file) That page works fine, but when i try to redirect the security code page to download.php, it requires to block off the POPUPs blocker, I'm asking how can i redirect to security code page to download.php, and it will open my the OPEN or SAVE DIALOG without shutting off the popups blocker. Understant? Quote Link to comment https://forums.phpfreaks.com/topic/75622-problem-with-file-download/#findComment-382640 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.