Hey im a newbee to PHP, so dont laugh…
basically i have created this Contact from…
[php]<form action="contact.php"method=“post”>
<label for="Name">Name:</label>
<input type="text" name="name" id="name" required placeholder="Name" />
<label for="name">Contact:</label>
<input type="text" name="Contact" id="subject" required placeholder="Contact Number" />
<label for="email">Email:</label>
<input type="email" name="email" id="email" required placeholder="[email protected]" />
<label for="message">Message:</label>
<textarea name="message" id="message" required placeholder= "please be as detailed as possible"/></textarea>
<input type="submit" value=Send Message"<address> />
</form>[/php]
It was part of a template i downloaded, and i have been working on it a while, the PHP associated with this is as follows…
[php]<?php
$field_name = $_POST[‘cf_name’];
$field_Contact = $_POST[‘cf_Contact’];
$field_Email = $_POST[‘cf_Email’];
$field_Message = $_POST[‘cf_Message’];
$mail_to = ‘[email protected]’;
$subject = 'Survey Request From BBS Website '.$field_name;
$body_message .= '$From: '.$name."\n";
$body_message .= '$Contact: '.$Contact."\n";
$body_message .= '$E-mail: '.$email."\n";
$body_message .= '$Message: '.$message;
$headers = 'From: '.$field_email."\r\n";
$headers .= 'Reply-To: '.$field_email."\r\n";
$mail_status = mail($mail_to, $subject, $body_message, $headers);
if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Im sorry something has gone wrong!');
window.location = 'HTTp://www.bbsurveys.co.uk';
</script>
<?php
}
?>[/php]
here is my problem, it all works fine, when i press send, it says thank you very much, but the Email i receive is just…
$email
$contact
$message
i can see why it is doing it, i just cant see a way of fixing it to include the text in the field.
Lack of PHP knowledge i think
Any help would be greatly appreciated
cheers Rio