Hi all,
I’m not sure what i’m doing wrong as this code normally works for me but it isn’t this time. Maybe i’ve missed something and because i’ve been starring at it for the last 3hrs i’ve gone cross eyed.
Here’s my code, any help would be much appreciated: –
[COLOR=”Blue”]<form action=”sendmail.php” method=”post”>
<p>Name:</p>
<input class=”form” name=”name” type=”text” /><br />
<p>Address:</p>
<textarea class=”form” name=”address” rows=”3″></textarea><br />
<p>Contact Number:</p>
<input class=”form” name=”tel” type=”text” /><br />
<p>Email Address:</p>
<input class=”form” name=”email” type=”text” /><br />
<p>Reason for contact:</p>
<select class=”form” name=”reason”>
<option selected=”selected”>Please select</option>
<option>example1</option>
<option>example2</option>
<option>example3</option>
</select><br />
<p>Message:</p>
<textarea class=”form” name=”message” rows=”3″></textarea>
<input name=”submit” type=”submit” value=”Submit” /><input name=”reset” type=”reset” value=”Reset” />
</form>
<?php
$email = $_REQUEST[’email’] ;
$message = $
$name = $_POST[‘name’] ;
$address = $
$tel = $_POST[‘tel’] ;
$reason = $
$Body = “<b>WEBSITE ENQUIRY</b><br />”;
$Body .= “n”;
$Body .= “<b><font size 1>Name: </font></b>”;
$Body .= $name;
$Body .= “n<br />”;
$Body .= “<b><font size 1>Address: </font></b>”;
$Body .= $address;
$Body .= “n<br />”;
$Body .= “<b><font size 1>Tel Number: </font></b>”;
$Body .= $tel;
$Body .= “n<br />”;
$Body .= “<b><font size 1>E-Mail: </font></b>”;
$Body .= $email;
$Body .= “n<br />”;
$Body .= “<b><font size 1>Reason for contact: </font></b>”;
$Body .= $reason;
$Body .= “n<br />”;
$Body .= “n<br />”;
$Body .= “<b><font size 1>Message: </font></b>”;
$Body .= “n<br />”;
$Body .= $message;
mail( “
$Body, “From: $emailrnContent-type: text/html; charset=utf-8”);
header( ‘Location: thankyou.php’ );
?>[/COLOR]