Good Evening,
I have just upgraded from V7 to V10 the website address is www.hartsofstur.com and wish to include a price match form that will collect the required information and e-mail it to sales@hartsofstur.com.
I have used php embed in a fragment on a page called price_match_from.php and have used the following code below:
!!<<actinic:block php="true" >
<form method="post" action="price_match_response.php">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><h1><div align="center">Harts Of Stur Price Match</div></h1></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4">
<div class="fragmentbody"align="justify">Here at Harts Of Stur, we pride ourselves on our customer service and competitive pricing. Great as we are (well, we think so), we do not always know when our competitors offer special deals. Please ask us to price match on these occasions and if we can, we will!</div>
</td>
</tr>
<tr>
<td width="20%"><div class="fragmentbody" align="left"><strong>Name:</strong></div></td>
<td colspan="3">
<div align="left">
<input name="name" type="text" id="name" size="50" maxlength="200">
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>Telephone No: </strong></div></td>
<td colspan="3">
<div align="left">
<input name="telephone" type="text" id="telephone" size="50" maxlength="200">
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>E-Mail:</strong></div></td>
<td colspan="3">
<div align="left">
<input name="email" type="text" id="email" size="50" maxlength="200">
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>Product And Price To Match.<br/>(Including Delivery)</strong></div></td>
<td colspan="3">
<div align="left">
<textarea name="message" cols="50" rows="4" id="message"></textarea>
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>Company To Match And Website :</strong></div></td>
<td colspan="3">
<div align="left">
<textarea name="address" cols="50" rows="4" id="address"></textarea>
</div></td>
</tr>
<tr>
<td><div align="left"></div></td>
<td colspan="3">
<div align="left">
<input name="submit_button" type="submit" id="submit_button" value="Submit">
<input type="reset" name="Reset" value="Reset">
</div></td>
</tr>
</table>
</form>
</actinic:block>>!!
The resulting page is price_match_response.php and conatins the following code embed in a fragment:
!!<<actinic:block php="true" >
<?php
$name = $_POST['name'];
$address = $_POST['address'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$message = $_POST['message'];
$headers = "From: $email";
// Validation
if(3 < strlen($name) && 3 < strlen($email) && 3 < strlen($message))
{
$email_message = <<< EMAIL
Message from websites Price Match form.
Name: $name
Telephone:$telephone
Email:$email
Product and Price:
$message
Company:$address
EMAIL;
if(mail('sales@hartsofstur.com', "Enquiry For Harts Of Stur" , $email_message, $headers))
{
echo "Thank you for your price match enquiry. We will deal with this as soon as possible and will contact you with our response";
}
else
{
echo "We had a problem sending the email.";
}
}
else
{
echo "You did not fill in the form properly. Please use the browser's 'back' button and update the form.";
}
?>
</actinic:block>>!!
Unfortunately when the website is loaded the following is only displayed on the page (please see http://www.hartsofstur.com/acatalog/...match_form.php)
Parse error: parse error in main on line 2
Any help on how to solve this or on a better way to achieve the aim will be greatly appreciated.
I have just upgraded from V7 to V10 the website address is www.hartsofstur.com and wish to include a price match form that will collect the required information and e-mail it to sales@hartsofstur.com.
I have used php embed in a fragment on a page called price_match_from.php and have used the following code below:
!!<<actinic:block php="true" >
<form method="post" action="price_match_response.php">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><h1><div align="center">Harts Of Stur Price Match</div></h1></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4">
<div class="fragmentbody"align="justify">Here at Harts Of Stur, we pride ourselves on our customer service and competitive pricing. Great as we are (well, we think so), we do not always know when our competitors offer special deals. Please ask us to price match on these occasions and if we can, we will!</div>
</td>
</tr>
<tr>
<td width="20%"><div class="fragmentbody" align="left"><strong>Name:</strong></div></td>
<td colspan="3">
<div align="left">
<input name="name" type="text" id="name" size="50" maxlength="200">
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>Telephone No: </strong></div></td>
<td colspan="3">
<div align="left">
<input name="telephone" type="text" id="telephone" size="50" maxlength="200">
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>E-Mail:</strong></div></td>
<td colspan="3">
<div align="left">
<input name="email" type="text" id="email" size="50" maxlength="200">
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>Product And Price To Match.<br/>(Including Delivery)</strong></div></td>
<td colspan="3">
<div align="left">
<textarea name="message" cols="50" rows="4" id="message"></textarea>
</div></td>
</tr>
<tr>
<td><div class="fragmentbody" align="left"><strong>Company To Match And Website :</strong></div></td>
<td colspan="3">
<div align="left">
<textarea name="address" cols="50" rows="4" id="address"></textarea>
</div></td>
</tr>
<tr>
<td><div align="left"></div></td>
<td colspan="3">
<div align="left">
<input name="submit_button" type="submit" id="submit_button" value="Submit">
<input type="reset" name="Reset" value="Reset">
</div></td>
</tr>
</table>
</form>
</actinic:block>>!!
The resulting page is price_match_response.php and conatins the following code embed in a fragment:
!!<<actinic:block php="true" >
<?php
$name = $_POST['name'];
$address = $_POST['address'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$message = $_POST['message'];
$headers = "From: $email";
// Validation
if(3 < strlen($name) && 3 < strlen($email) && 3 < strlen($message))
{
$email_message = <<< EMAIL
Message from websites Price Match form.
Name: $name
Telephone:$telephone
Email:$email
Product and Price:
$message
Company:$address
EMAIL;
if(mail('sales@hartsofstur.com', "Enquiry For Harts Of Stur" , $email_message, $headers))
{
echo "Thank you for your price match enquiry. We will deal with this as soon as possible and will contact you with our response";
}
else
{
echo "We had a problem sending the email.";
}
}
else
{
echo "You did not fill in the form properly. Please use the browser's 'back' button and update the form.";
}
?>
</actinic:block>>!!
Unfortunately when the website is loaded the following is only displayed on the page (please see http://www.hartsofstur.com/acatalog/...match_form.php)
Parse error: parse error in main on line 2
Any help on how to solve this or on a better way to achieve the aim will be greatly appreciated.
Comment