Jump to content

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


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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.