close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Fatal Error: Function name must be a string

Thread began 8/25/2009 11:52 am by tom92909 | Last modified 9/15/2009 1:43 pm by tom92909 | 4582 views | 5 replies


Fatal error: Function name must be a string

I am having Trouble with something similar.

I am trying to create a php script for an online form, and the following appears:
Fatal error: Function name must be a string in D:\Hosting\3560291\html\contactformprocess.php on line 9

My code is the one below, can someone tell me whats wrong with it?


/* Subject and Email Variables */

$emailSubject = 'September 19th registration!';
$webMaster = '';

/* Gathering Data Variables */
$emailFiled = $_POST('email');
$nameField = $_POST('name');
$phoneField = $_POST('phone');
$addressField = $_POST('address');
$hearField = $_POST('hear');
$travelersField = $_POST('travelers');
$commentsField = $_POST('comments');

$body = <<< EOD
Email: $email <br>
Name: $name <br>
Phone: $phone <br>
Address: $address <br>
How did you hear about us?: $hear <br>
How many will be attending?: $travelers <br>
Comments: $comments <br>

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);

/* Results rendered as HTML */

$theResults = <<< EOD
<title>Connecticut Educational Services</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;

<div align="left">Thank you for your interest! Your email will be answered very soon!</div>
echo "$theResults";

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...