Hi all
I'm having trouble making an email form. i have already configured the smtp in my ph.ini. I know it works i have tested it.
here is my messy code, i tried messing about with hidden fields, but am not sure that i need them now.lol
can any one assist
<form name="emailform" method="post" action="<? $PHP_SELF ?>">
<table width="374" height="160" border="0">
<tr>
<th width="54" scope="row">Status of job </th>
<td width="250"><strong>Email comment </strong></td>
<td width="56"> </td>
</tr>
<tr>
<th scope="row"><input name="techId" type="text" size="8" maxlength="5"></th>
<td><textarea name="action_taken" cols="35" rows="5"></textarea></td>
<td> </td>
</tr>
<?php
if ($_POST['thisIS'] == "emailThing")
$to = "poo@poo.com";
$from = "poo@ntlworld.com";
$message = "hello, you job has now been completed";
mail($to, "technical services", $message,
"From: {$from}\r\n"
."Reply-To: {$from}\r\n"
."X-Mailer: PHP/" . phpversion());
?>
<tr>
<th scope="row"> </th>
<td><input type="submit" name="Submit" value="Submit"> <input type="hidden" name="thisIS" value="emailThing" ></td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
</tr>
</table>
</form>