Forum Moderators: coopster
<!--Start form table--><br><br>
<table width="450" cellspacing="2" border="0" cellpadding="2" align="center">
<tbody align="left" valign="middle">
<tr>
<td><form method="post" action="sendmail.php">
Votre Email: <input name="email" type="text" class="input" /><br />
Votre Message:<br />
<textarea name="message" rows="18" cols="60" class="input" >
</textarea><br />
<input type="submit" value="Envoyer" class="button" />
</form></td>
</tr>
</tbody>
</table>
<!--End form table--> <?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
if (!isset($_REQUEST['email'])) {
header( "Location: http://www.somedomain.com/thanks.php" );
}
elseif (empty($email) || empty($message)) {
?>
<html>
<head>
<body>
<table width="960" cellspacing="2" border="0" cellpadding="2" align="center" bgcolor=#E7CE97>
<tbody>
</tr>
<tr>
<td>You have not filled in all the fields
<br> <a href="contact.php" target="_self">please click here and start again</a><br><br><br><br><br></td>
</tr>
</tbody>
</table>
</body>
</html>
<?php
}
else {
mail( "contact@somedomain.com", "Message from somedomain.com",
$message, "From: $email" );
header( "Location: http://www.somedomain.com/thanks.php" );
}
?> <!--Start form table--><br><br>
<table width="450" cellspacing="2" border="0" cellpadding="2" align="center">
<tbody align="left" valign="middle">
<tr>
<td><form method="post" action="sendmail.php">
Votre Email: <input name="email" type="text" class="input" /><br />
Votre Nom: <input name="name" type="text" class="input" /><br /><br>
Votre Tel: <input name="tel" type="text" class="input" /><br /><br>
Votre Message:<br />
<textarea name="message" rows="18" cols="60" class="input" >
</textarea><br />
<input type="submit" value="Envoyer" class="button" />
</form></td>
</tr>
</tbody>
</table>
<!--End form table-->