ted_chou12 Posted January 5, 2007 Share Posted January 5, 2007 This is the problem:Parse error: parse error, unexpected '}' in /var/wkscript/www/firewall/firewall.php on line 74and this is my php:<?php $to = $_GET['to'];$subject = $_GET['subject'];$from = $_GET['from'];$return = $_GET['return'];$body = $_GET['body'];$headers = "MIME-Version: 1.0rn";$headers .= "Content-type: text/html; charset=iso-8859-1rn";$headers .= "From: myname<$from>rn"; $headers .= "Return-Path: <$return>";if (mail($to, $subject, $body, $headers)) {$_SESSION["mail"] = "true";} else {$_SESSION["mail"] = "false";}header("location: {$_SERVER['HTTP_REFERER']}");?>But I dont see any errors...Can someone help me with this?Thanks Link to comment https://forums.phpfreaks.com/topic/33019-parse-error-parse-error-unexpected-in-varwkscriptwwwfirewallfirewall/ Share on other sites More sharing options...
Jessica Posted January 5, 2007 Share Posted January 5, 2007 header("Location: $_SERVER['HTTP_REFERER']");You don't need those {} Link to comment https://forums.phpfreaks.com/topic/33019-parse-error-parse-error-unexpected-in-varwkscriptwwwfirewallfirewall/#findComment-153781 Share on other sites More sharing options...
effigy Posted January 5, 2007 Share Posted January 5, 2007 [list][*]Please use code tags when posting.[*]Where is line 74?[*]Use[tt] extract [/tt]to pull the $_GET values out.[/list] Link to comment https://forums.phpfreaks.com/topic/33019-parse-error-parse-error-unexpected-in-varwkscriptwwwfirewallfirewall/#findComment-153782 Share on other sites More sharing options...
kenrbnsn Posted January 5, 2007 Share Posted January 5, 2007 I hope you're going to do some verification on the input values because if you put this out on the internet like it is, the spammers are going to find it and use this script to send tons of spam and it will look like it's coming from you.The header() line can be writen as[code]<?phpheader('Location: ' . $_SERVER['HTTP_REFERER']);?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/33019-parse-error-parse-error-unexpected-in-varwkscriptwwwfirewallfirewall/#findComment-153788 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.