Welcome to WebmasterWorld Guest from 174.129.135.89

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Form Submission Error

Error During Form Submission

   
8:39 am on Oct 5, 2012 (gmt 0)



hi, I have just started learning php And i am facing problem in the form i have made.

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in public_html/feedback/contact_form/contact.php on line 54


<?php

include 'config.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;

if($post)
{
include 'functions.php';
$name = stripslashes($_POST['name']);
$email = trim($_POST['email']);
$address = stripslashes($_POST['address']);
$contact = stripslashes($_POST['contact']);
$design = stripslashes($_POST['design']);
$colour = stripslashes($_POST['colour']);

$error = '';

// Check name
if(!$name)
{
$error .= 'I think you forget to enter your name.<br />';
}
// Check email
if(!$email)
{
$error .= 'I think you forget to enter your e-mail id.<br />';
}
// Check feedback msg
if(!$address)
{
$error .= 'I think you forget to enter your address.<br />';
}
if(!$contact)
{
$error .= 'I think you forget to enter your Contact number.<br />';
}
if(!$design)
{
$error .= 'I think you forget to select the Design.<br />';
}
if(!$colour)
{
$error .= 'I think you forget to select the colour.<br />';
}

if($email && !ValidateEmail($email))
{
$error .= 'Invalid E-mail id !<br />';
}
if(!$error)
{
$mail = mail(WEBMASTER_EMAIL, $subject, $address, $contact, $design, $colour,
"From: ".$name." <".$email.">\r\n"
."Reply-To: ".$email."\r\n"
."X-Mailer: PHP/" . phpversion());
if($mail)
{
echo 'OK';
}
}
else
{
echo '<div class="notification_error">'.$error.'</div>';
}
}
?>
1:33 pm on Oct 5, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your mail() function is wrong. Wrong number of parameters.
Take a look at php mail() [gr2.php.net] to see proper syntax
 

Featured Threads

Hot Threads This Week

Hot Threads This Month