Nej, for der skal lave noget om, den ser sådan ud:
<html><head><title>Formmail eksempel</title></head><body>
<div align="center">
<p><font size="5">Bestil Webhotel.</font></p>
</div>
<form action="bestil.php" medthod="post">
<!-- Fortæller hvilken side der bruges -->
<input type="hidden" name="side" value="bestil.php">
<!-- Giver en ordre til siden der sendes til -->
<input type="hidden" name="ordre" value="send_email"><input type="hidden" name="required" value="subdomain, navn, adresse, email, telefon, postnr_by, webhotel_type[], webhotel_str[], accepter">
<div align="center">
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td width="45%">
<div align="right">
<strong>Ønsket subdomain</strong></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"></td>
<td><input name="subdomain" type="text" id="name"></td>
</tr>
<tr>
<td width="45%">
<div align="right">
<strong>Navn</strong></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input name="navn" type="text" id="name"></td>
</tr>
<tr>
<td width="45%">
<div align="right">
<strong>Adresse</strong></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input name="adresse" type="text" id="phone_no"></td>
</tr>
<tr>
<td width="45%">
<div align="right">
<strong>Email</strong></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td width="45%">
<div align="right">
<b>Telefon</b></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input name="telefon" type="text" id="fax_no"></td>
</tr>
<tr>
<td width="45%">
<div align="right">
<b>Postnr og By</b></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input name="postnr_by" type="text" id="zip_code"></td>
</tr>
<tr>
<td width="45%">
<div align="right">
<strong>Webhotel type</strong></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input type="checkbox" name="webhotel_type[]" value="asp" border="0"> ASP / <input type="checkbox" name="webhotel_type[]" value="php" border="0"> PHP</td>
</tr>
<tr>
<td width="45%">
<div align="right">
<b><font size="3">Webhotel størrelse</font></b></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input type="radio" name="webhotel_str" value="klan_site" border="0"> Klan site / <input type="radio" name="webhotel_str" value="mini" border="0">Mini / <input type="radio" name="webhotel_str" value="medium" border="0"> Medium / <input type="radio" name="webhotel_str" value="maxi" border="0"> Maxi</td>
</tr>
<tr>
<td width="45%">
<div align="right">
<b><font size="3">Betaling</font></b></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"></td>
<td><input type="checkbox" name="betaling[]" value="helaarlig" border="0"> Halvårlig / <input type="checkbox" name="betaling[]" value="halvaarlig" border="0"> Helårlig</td>
</tr>
<tr>
<td width="45%">
<div align="right">
<b>Jeg accepterer reglerne for guldweb's webhotel!</b></div>
</td>
<td width="10">
<div align="center">
<strong>:</strong></div>
</td>
<td width="15"> </td>
<td><input type="checkbox" name="accepter" value="" border="0"></td>
</tr>
<tr>
<td width="45%">
<div align="right"></div>
</td>
<td width="10"></td>
<td width="15"></td>
<td>Alle Felter skal udfyldes.</td>
</tr>
</table>
<input type=submit value="Send."></div>
</form>
<div align="center">
<?php
// Hvis ordren er 'send_email' så udfør
if ($ordre == "send_email") {
// Mailen sendes til denne adresse. Flere adresser kan sepereres med komma.
$recipient = "heidi"."@heidimus.com";
// Emne
$subject = "Bestilling af webhotel";
$message .= "Kundeinformation:\\n"; // \\n er et linieskift
$message .= "Information Ang. oprettelse af mail adresse:\\n"; // \\n er et linieskift
$message .= "Subdomain: $subdomain\\n";
$message .= "Navn: $navn\\n";
$message .= "Adresse: $adresse\\n";
$message .= "Mail-adresse: $email\\n";
$message .= "Telefon: $telefon\\n";
$message .= "Postnr og By: $postnr_by\\n";
foreach ($webhotel_type as $val) $strwebhotel_type .= $val.", "; if (substr($strwebhotel_type, -2) == ", ") $strwebhotel_type = substr($strwebhotel_type, 0, -2);
$message .= "Webhotel type: $strwebhotel_type\\n";
//foreach ($webhotel_str as $val) $strwebhotel_str .= $val.", "; if (substr($strwebhotel_str, -2) == ", ") $strwebhotel_str = substr($strwebhotel_str, 0, -2);
$message .= "Webhotel størrelse: $webhotel_str\\n";
$message .= "Betalingsbetingelser: $betaling\\n";
mail($recipient, $subject, $message);
//echo nl2br($message);
print "Deres bestilling er sendt $recipient";
/*
Se på http://dk.php.net/manual/function.mail.php
for flere detaljer om at sende emails i PHP
*/
}
?></div>
</body></html>
Mvh
Michael
Du kopierer vel bare al teksten til fx "formmail2.php" og så ændrer du lige
<form action="formmail.php" ...
til
<form action="formmail2.php" ...
/AC