CGI mailform...styret output til email modtager
I følgende skript vil jeg gerne styre outputtet til mailmodtageren. Hvordan gør jeg det?Nuværende situation: Outputtet ændre rækkefølge alt efter hvilke felter der udfyldes og hvilke "checkboxe" der klikkes på.
Eksempel Nuværende produkt af skript:
Firma: Prøve
Kontaktperson: Madsen
Tekst: prøve
Adresse: Niels Bohrsvej 2
Send: Send
Transport+til+Vingsted: JA TAK
fromaddress: webmaster@aj-fodbold.dk
Telefon: 75757575
Bynavn: 8722 Hedensted
Antal+deltagere: 2
Fax: 75757575
Email: dspannernet@hotmail.com
Her vil jeg så bestemme i hvilken rækkefølge oplysningerne skal komme.
<html>
<head>
<title>formmail</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#0068B0">
<p> </p>
<p align="center"> </p>
<FORM METHOD="POST" ACTION="http://scripts.abusiness.dk/formmail.pl">
<input type=hidden name=recipient value="test@aj-fodbold.dk">
<input type=hidden name=subject value="Tilmeldning til julefrokost 2003">
<input type=hidden name=redirect value="http://www.aj-fodbold.dk/tak.htm">
<input type=hidden name=fromaddress value="webmaster@aj-fodbold.dk">
<input type="hidden" name="return_link_url" value="http://www.aj-fodbold.dk/tak.htm">
<div align="center"><center><table
border="0">
<tr>
<td>
<h2 align="center"><strong><font face="verdana" size="4" color="#FFFFFF">Jeg
vil gerne forudbestille billetter til Julefrokosten i Vingsted,<br>
</font></strong><strong><font face="verdana" size="4" color="#FFFFFF">lørdag
den 6 december 2003.</font></strong></h2>
</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" width="35%">
<tr>
<td width="95%">
<h3 align="left"><font face="verdana" size="3" color="#FFFFFF">
<input type="checkbox" name="Transport til Vingsted"
value="JA TAK">
Bustransport ønskes til Vingsted</font></h3>
</td>
<td rowspan="2" width="5%"> </td>
</tr>
<tr>
<td width="95%">
<h3 align="left"><font face="verdana" size="3" color="#FFFFFF">
<input type="checkbox" name="Transport fra Vingsted"
value="JA TAK">
Bustransport ønskes fra Vingsted</font></h3>
</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0">
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Firmanavn .........
</font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="35"
name="Firma">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Kontaktperson ..
</font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="35"
name="Kontaktperson">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Adresse..............
</font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="35"
name="Adresse">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Postnr. / by .......
</font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="35"
name="Bynavn">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Telefon .............
</font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="11"
name="Telefon">
Fax ..........
<input type="text"
size="11" name="Fax">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Antal deltagere
.. </font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="35"
name="Antal deltagere">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">E-mail adresse ..
</font></h3>
</td>
<td colspan="2">
<h3><font face="verdana" size="2" color="#FFFFFF">
<input type="text" size="35"
name="Email">
</font></h3>
</td>
</tr>
<tr>
<td>
<h3><font face="verdana" size="2" color="#FFFFFF">Evt. kommentar </font></h3>
</td>
<td colspan="2"> <font face="verdana" size="2" color="#FFFFFF">
<textarea name="Tekst" rows="2"
cols="30"></textarea>
</font></td>
</tr>
</table>
</center></div><div align="center"><center><table border="0">
<tr>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="10">
<h3> </h3></td>
<td align="center" width="10">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="53"><font color="#FFFFFF">
<input
type="submit" name="Send" value="Send"></font></td>
<td align="center" width="0">
<h3> </h3></td>
<td align="center" width="0">
<h3> </h3></td>
<td width="0">
<h3> </h3></td>
<td align="center" width="72"><font color="#FFFFFF">
<input
type="reset" name="Slet" value=" Slet alt "></font></td>
</tr>
</table>
</center></div>
</form>
</body>
</html>