forumnz Posted August 29, 2008 Share Posted August 29, 2008 I have this script I wrote to set cookies. Why doesn't it work? It just says "500 Internal Server Error". Thanks. <?php $m025to039 = $_POST['m025to039']; $m090to099 = $_POST['m090to099']; $m040to049 = $_POST['m040to049']; $m100to149 = $_POST['m100to149']; $m050to068 = $_POST['m050to068']; $m150to199 = $_POST['m150to199']; $m069to079 = $_POST['m069to079']; $m200to299 = $_POST['m200to299']; $m080to089 = $_POST['m080to089']; $m300plus = $_POST['m300plus']; $cur = $_POST['currency']; setcookie("m025to039", $m025to039); setcookie("m090to099", $m090to099); setcookie("m040to049", $m040to049); setcookie("m100to149", $m100to149); setcookie("m050to068", $m050to068); setcookie("m150to199", $m150to199); setcookie("m069to079", $m069to079); setcookie("m200to299", $m200to299); setcookie("m080to089", $m080to089); setcookie("m300plus", $m300plus); setcookie("curr", $cur); header("Location Search.php?m=s"); ?> Link to comment https://forums.phpfreaks.com/topic/121830-internal-server-error/ Share on other sites More sharing options...
ratcateme Posted August 29, 2008 Share Posted August 29, 2008 are you running it as a CGI install try adding this to the top #!/path/to/php or #!C:\path\to\php.exe <?php $m025to039 = $_POST['m025to039']; $m090to099 = $_POST['m090to099']; $m040to049 = $_POST['m040to049']; $m100to149 = $_POST['m100to149']; $m050to068 = $_POST['m050to068']; $m150to199 = $_POST['m150to199']; $m069to079 = $_POST['m069to079']; $m200to299 = $_POST['m200to299']; $m080to089 = $_POST['m080to089']; $m300plus = $_POST['m300plus']; $cur = $_POST['currency']; setcookie("m025to039", $m025to039); setcookie("m090to099", $m090to099); setcookie("m040to049", $m040to049); setcookie("m100to149", $m100to149); setcookie("m050to068", $m050to068); setcookie("m150to199", $m150to199); setcookie("m069to079", $m069to079); setcookie("m200to299", $m200to299); setcookie("m080to089", $m080to089); setcookie("m300plus", $m300plus); setcookie("curr", $cur); header("Location Search.php?m=s"); ?> Scott. Link to comment https://forums.phpfreaks.com/topic/121830-internal-server-error/#findComment-628557 Share on other sites More sharing options...
PFMaBiSmAd Posted August 29, 2008 Share Posted August 29, 2008 The syntax in the header() is incorrect, though I doubt this would generate a 500 error. Link to comment https://forums.phpfreaks.com/topic/121830-internal-server-error/#findComment-628559 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.