Jump to content

Parse error: parse error, unexpected '}' in /var/wkscript/www/firewall/firewall.


ted_chou12

Recommended Posts

This is the problem:
Parse error: parse error, unexpected '}' in /var/wkscript/www/firewall/firewall.php on line 74
and 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
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]<?php
header('Location: ' . $_SERVER['HTTP_REFERER']);
?>[/code]

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.