php Spørsmål
jeg har fået lavet, en formmail til min hjemme side. Ser sådan ud! http://www.buyteflon.dk/Bestillingsforside.htmmit problem er at men skal udfylde alle felter ! og det jeg vil lave om er af men ikke skal udfyle det felt der hedder (Evt. andet)hvad skal jeg fjerne i min php kode ?
Ser sådan ud:
<html><title>bestlling</title><style>input {font: bold 10px verdana;} body {font: bold 10px verdana;} </style><body bgcolor='white' onblur=window.close() topmargin="4">
<form method="POST" action="<?php $_SERVER['PHP_SELF']; ?>">
<p><font face="Verdana"><span style="font-weight: 400">Nick Name:</span><br>
<input name='nick' type=text id="nick" style="color: #000000; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" size="20">
<br><br>
<span style="font-weight: 400">Fornavn & Efternavn:</span><br>
<input name='fornavn' type=text id="fornavn" style="color: #000000; border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" size="20">
<input name='efternavn' type=text id="efternavn" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" size="20">
<br><br>
<span style="font-weight: 400">Adresse:</span><br>
<input name='adresse' type=text id="adresse" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1" size="20">
<br> <br>
<span style="font-weight: 400">Postnummer & by:</span><br>
<input type=text name='postnummer' size="8" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<input type=text name='by' size="20" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"><br><br>
<span style="font-weight: 400">Telefon:</span><br>
<input type=text name='telefon' size="20" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"><br><br>
<span style="font-weight: 400">Mobil telefon:</span><br>
<input type=text name='mobiltelefon' size="20" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"><br><br>
<span style="font-weight: 400">Email:</span><br>
<input type=text name='email' size="20" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"><br><br>
<span style="font-weight: 400">Produkter:</span><br>
<font size="1">
<select name='produkter' style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1">
<option value='Teflon 50cm + porto 7,- ( I alt kr. 25,- ) '>Teflon 50cm + porto 7,- ( I alt kr. 25,- ) </option>
<option value='Teflon 100cm + porto 7,- ( I alt kr. 37,- ) '>Teflon 100cm + porto 7,- ( I alt kr. 37,- ) </option>
<option value='Teflon 2m + porto 7,- ( I alt kr. 67,- ) '>Teflon 2m + porto 7,- ( I alt kr. 67,- ) </option>
<option value='Teflon 3m + porto 7,- ( I alt kr. 97,- ) '>Teflon 3m + porto 7,- ( I alt kr. 97,- ) </option>
<option value='Teflon 4m + porto 7,- ( I alt kr. 127,- ) '>Teflon 4m + porto 7,- ( I alt kr. 127,- ) </option>
<option value='Teflon 5m + porto 7,- ( I alt kr. 157,- ) '>Teflon 5m + porto 7,- ( I alt kr. 157,- ) </option>
<option value='Teflon 6m + porto 40,- ( I alt kr. 220,- ) '>Teflon 6m + porto 40,- ( I alt kr. 220,- ) </option>
<option value='Teflon 7m + porto 40,- ( I alt kr. 250,- ) '>Teflon 7m + porto 40,- ( I alt kr. 250,- ) </option>
<option value='Teflon 8m + porto 40,- ( I alt kr. 260,- ) '>Teflon 8m + porto 40,- ( I alt kr. 280,- ) </option>
<option value='Teflon 9m + porto 40,- ( I alt kr. 310,- ) '>Teflon 9m + porto 40,- ( I alt kr. 310,- ) </option>
<option value='Teflon 10m + porto 40,- ( I alt kr. 340,- ) '>Teflon 10m + porto 40,- ( I alt kr. 340,- ) </option>
<option value='Teflon 11m + porto 40,- ( I alt kr. 370,- ) '>Teflon 11m + porto 40,- ( I alt kr. 370,- ) </option>
<option value='Teflon 12m + porto 40,- ( I alt kr. 400,- ) '>Teflon 12m + porto 40,- ( I alt kr. 400,- ) </option>
<option value='Teflon 13m + porto 40,- ( I alt kr. 430,- ) '>Teflon 13m + porto 40,- ( I alt kr. 430,- ) </option>
<option value='Teflon 14m + porto 40,- ( I alt kr. 460,- ) '>Teflon 14m + porto 40,- ( I alt kr. 460,- ) </option>
<option value='Teflon 15m + porto 40,- ( I alt kr. 490,- ) '>Teflon 15m + porto 40,- ( I alt kr. 490,- ) </option>
<option value='Teflon 30m + porto 40,- ( I alt kr. 550,- ) '>Teflon 30m + porto 40,- ( I alt kr. 550,- ) </option>
<option value='Teflon 60m + porto 40,- ( I alt kr. 1000,- ) '>Teflon 60m + porto 40,- ( I alt kr. 1000,- ) </option>
</select></font><br><br>
<span style="font-weight: 400">Evt. andet:</span><br>
<font size="1">
<textarea name='evtandet' rows="4" cols="29" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1"></textarea></font><br><br>
<span style="font-weight: 400">Jeg accepterer: </span></font><span style="font-weight: 400"> <font face="Verdana" size="1">Buyteflon's Forretningsbetingelser</font></span><font
face="Verdana"><br>
</font>
<br>
<input name='iaccept' type='checkbox' value='User checked.'><br><br>
<input name="Submit" type="Submit" id="Submit" value="Send">
</form></body></html><style type="text/css"></style>
<!--
BODY {
scrollbar-face-color: #ffffff;
scrollbar-highlight-color: #333333;
scrollbar-3dlight-color: #ffffff;
scrollbar-darkshadow-color: #ffffff;
scrollbar-shadow-color: #333333;
scrollbar-arrow-color: #333333;
scrollbar-track-color: #ffffff;
}
-->
<?php
if($_POST["Submit"] == "Send") {
if ((!$nick) || (!$fornavn) || (!$efternavn) || (!$adresse) || (!$postnummer) || (!$by) || (!$telefon) || (!$mobiltelefon) || (!$email) || (!$produkter) || (!$evtandet)) {
echo "Du skal udfylde alle felter!";
exit;
}
if (!$iaccept) {
echo "Du skal acceptere reglerne, læs dem på: <a href=\"http://www.buyteflon.dk/regler.htm\">http://www.buyteflon.dk/regler.htm</a>";
exit;
}
$message = "Ny teflonbestilling!\n\n $nick \n\n $fornavn \n\n $efternavn \n\n $adresse \n\n $postnummer \n\n $by \n\n $telefon \n\n $mobiltelefon \n\n $email \n\n $produkter \n\n $evtandet \n\n For at betale skal du sætte penge ind på 000000000000 \n\n Mvh Teflonbestillings-firma";
mail("erik_bjeld@msn.com", "Teflonbestilling", $message,
"From: teflon@tape.dk\r\n" .
"Reply-To: teflon@tape.dk\r\n");
echo "Din bestilling er sendt afsted!";
}
?>