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 Quote 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 {} Quote 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] Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.