Hi there,
I have just asked a question regarding my contact form and two people were kind enough to help me out... It was working for a while but i wasn't getting all the data in my email so i played around with it for a while and now i seemed to have messed it up totally... now i get the message
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Inetpub\vhosts\rdosolutions.com\subdomains\newsite\httpdocs\send_contact.php on line 5
Please can someone help me because this is driving me crazy trying to fix it hehehe...
my html code for the form is (file named contact.php);
<form id="myform" action="send_contact.php" method="post" enctype="multipart/form-data">
<div>
<div class="field">
<label for="name" >Name</label>
<input class="inputfield textfield" name="name" type="text" />
</div>
<div class="field">
<label for="customer_mail" >E-mail</label>
<input class="inputfield textfield" name="customer_mail" type="text" />
</div>
<div class="field">
<label for="website" >Website</label>
<input class="inputfield textfield" name="website" type="text" />
</div>
<div class="field area">
<label for="detail" >Details</label>
<textarea class="inputfield textarea1" name="detail" ></textarea>
</div>
</div>
<!--div class="clear"></div-->
<input class="submitbutton" type="submit" value="Submit" name="Submit"/>
</form>
the php code is (file named send_contact.php)
<?php
// Contact subject
$subject ="Website enquiry";
// Details
$message=$_POST'detail';
// Mail of sender
$mail_from=$_POST'customer_mail';
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='[email protected]';
$send_contact=mail($to, $subject, $message, $header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
If someone can tell me exactly where i am going wrong i will be very grateful...
many thanks in advance
Rob
I have just asked a question regarding my contact form and two people were kind enough to help me out... It was working for a while but i wasn't getting all the data in my email so i played around with it for a while and now i seemed to have messed it up totally... now i get the message
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Inetpub\vhosts\rdosolutions.com\subdomains\newsite\httpdocs\send_contact.php on line 5
Please can someone help me because this is driving me crazy trying to fix it hehehe...
my html code for the form is (file named contact.php);
<form id="myform" action="send_contact.php" method="post" enctype="multipart/form-data">
<div>
<div class="field">
<label for="name" >Name</label>
<input class="inputfield textfield" name="name" type="text" />
</div>
<div class="field">
<label for="customer_mail" >E-mail</label>
<input class="inputfield textfield" name="customer_mail" type="text" />
</div>
<div class="field">
<label for="website" >Website</label>
<input class="inputfield textfield" name="website" type="text" />
</div>
<div class="field area">
<label for="detail" >Details</label>
<textarea class="inputfield textarea1" name="detail" ></textarea>
</div>
</div>
<!--div class="clear"></div-->
<input class="submitbutton" type="submit" value="Submit" name="Submit"/>
</form>
the php code is (file named send_contact.php)
<?php
// Contact subject
$subject ="Website enquiry";
// Details
$message=$_POST'detail';
// Mail of sender
$mail_from=$_POST'customer_mail';
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='[email protected]';
$send_contact=mail($to, $subject, $message, $header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
If someone can tell me exactly where i am going wrong i will be very grateful...
many thanks in advance
Rob