hjælp til et send script
Jeg har det her script som virker. Det jeg ønsker er at nogen af mine felter skal man skrive i før man kan sende lige nu kan man bare sende løs uden man har skrevet noget.Plz er der en der kan hjælpe mig med at rette det.
<?php
$MESSAGE = false;
if (isset($_REQUEST["name"])) {
$SUBJECT = $MESSAGE = "MAIL FRA " . $_SERVER["SERVER_NAME"];
foreach ($_REQUEST as $k=>$v) $MESSAGE .= "\r\n$k: $v";
if (! mail("min@mail.dk",$SUBJECT,$MESSAGE,"From: WebSite")) {
$MESSAGE = 'Din mail kunne ikke sendes';
$MESSAGE_COLOR = "#ffffff";
$MESSAGE_SIZE = "14";
} else{
$MESSAGE = 'Din mail er nu sendt';
$MESSAGE_COLOR = "#ffffff";
$MESSAGE_SIZE = "14";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<style type="text/css">
<!--
.style38 {font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; }
body {
background-color: #BBE0FA;
}
.style39 {font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000088; }
.style40 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #000088;
}
-->
</style></head>
<body>
<div align="center">
<?php
if ($MESSAGE) echo "<span style=\"color:$MESSAGE_COLOR;font-size:".$MESSAGE_SIZE."px\">$MESSAGE</span><hr>";
?>
<form action="" method="post" target="_self">
<span class="style40">Bliv ringet op</span></div>
<table width="314" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="50" class="style39" style="width:50px;text-align:left;">Navn:</td>
<td width="250" class="style13"><input name="name" type="text" class="style38" style="width:250px;"></td>
</tr>
<tr>
<td width="50" class="style39" style="width:50px;text-align:leftt;">Mail:</td>
<td class="style13"><input name="email" type="text" class="style38" style="width:250px;"></td>
</tr>
<tr>
<td width="50" class="style39" style="width:50px;text-align:left;">Telefon:</td>
<td class="style13"><input name="telefon" type="text" class="style38" style="width:250px;"></td>
</tr>
<tr>
<td colspan="2" class="style38"></td>
</tr>
<tr>
<td width="50" class="style39" style="width:100px;text-align:right;; font-weight: bold;"></td>
<td class="style38"></td>
</tr>
<tr>
<td width="50" class="style39" style="width:100px;text-align:right;; font-weight: bold;"></td>
<td class="style38"></td>
</tr>
<tr>
<td class="style39" style="width:50px;text-align:left;vertical-align:top;padding-top:3px;">Besked:</td>
<td class="style13"><textarea name="comment" rows="6" class="style38" style="width:250px;; font-weight: bold;"></textarea></td>
</tr>
<tr>
<td width="50" class="style39" style="width:50px;text-align:right;; font-weight: bold;"> </td>
<td align="center" class="style13">
<input type="submit" class="style39" value="Send besked"></td>
</tr>
</table>
</body>
</html>