Help... Fatal error: Function name must be a string in E:...
Hi, Im pretty new to php scripting and im confused as to why im recieving the error when trying to send mail through an online contact form:
Fatal error: Function name must be a string in E:\Domains\a\absolutionsaxophonequartet.com\user\htdocs\formhandler.php on line 10
the script i've written is as follows...
/* subject and email variables */
$emailSubject = 'Email Through Website';
$webMaster = 'email@example.com';
/* Gathering Data Variables */
$email = $_POST('youremail');
$name = $_POST('yourname');
$subject = $_POST('subject');
$content = $_POST('content');
$body = <<<EOD
Email: $youremail <br>
Name: $yourname <br>
Subject: $subject <br>
Content: $content <br>
$headers = "From: $youremail\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results Rendered as HTML */
$theResults = <<<EOD
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
font-family: Verdana, Arial, Helvetica, sans-serif;
<div align="left">Thank you for getting in touch! Your email will be answered very soon!</div>
If anyone could offer any solutions id be really grateful....i know its probably something stupid but im new to this and its 5 am and i've been trying to find answers on the net for hours...
Thanks very much!
You are using parentheses for array keys when they should be square brackets:
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
fantastic thanks very much!
I appreciate it!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)