Form og radioknapper
Jeg har lavet en form som sendes til en mail. Alle inputs bliver sendt undtagen alle dem med "radio" knapper. Hvorfor kun dem???Når jeg så får en mail siger den fx "radiovalue" hvor den i stedet skulle have sendt "ICQ"
HTML KODE:
<table><tr><form action="formular_tilmelding.php" method post="localhost" enctype="multipart/form-data">
<td><a>Fornavn:</a></td><td><input type=text name="fornavn"></td>
<tr><td><a>Efternavn:</a></td>
<td><input type=text name="Efternavn"></td>
<tr><td><a>By:</a></td>
<td><input type=text name="by"></td>
<tr><td><a>Alder:</a></td>
<td><select name="alder"><option>Vælg</option><option>16</option><option>17</option><option>18</option><option>19</option></select></td>
<tr><td>Uddannelse:</td>
<td><select name="udd"><option>Vælg</option><option>Erhverv</option><option>Gymnasial</option><option>HTX</option><option>HHX</option><option>HF</option></select></td>
<tr><td><font color="#aa0000"><strong>Com info:</strong></font></td>
<td><hr align="left" size="2" width="80%" color="#003399"></td>
<tr><td>Fabrikant:</td>
<td><input type=text name="fabrikant"></td>
<tr><td>Proccessor:</td>
<td><p>
<label>
<input type="radio" name="proccessor1" value="radioValue">
Pentium</label>
<br>
<label>
<input type="radio" name="proccessor2" value="radioValue">
AMD</label>
<br>
</p></td>
<tr><td>MHz:</td>
<td><select name="mhz"><option>Vælg</option><option>500MHz</option><option>600MHz</option><option>700MHz</option><option>800MHz</option><option>900MHz</option><option>1000MHz</option><option>1100MHz</option><option>1200MHz</option><option>1300MHz</option><option>1400MHz</option><option>1500MHz</option><option>1700MHz</option><option>1800MHz</option><option>1900MHz</option><option>2000MHz</option></select></td>
<tr><td>Ram:</td>
<td><select name="ram"><option>Vælg</option><option>64mb</option><option>128mb</option><option>256mb</option><option>512mb</option><option>1024mb</option></select></td>
<tr><td><a>Grafikkort:</a></td>
<td><input type=text name="grafik"></td>
<tr><td><font color="#aa0000"><strong>Game info:</strong></font></td>
<td><hr align="left" size="2" width="80%" color="#003399"></td>
<tr><td><a>Genre:</a></td>
<td><p>
<label>
<input type="radio" name="genre1" value="radioValue">
Strategi</label>
<br>
<label>
<input type="radio" name="genre2" value="radioValue">
Shoot'em up</label>
<br>
<label>
<input type="radio" name="genre3" value="radioValue">
Rollespil</label>
<br>
<label>
<input type="radio" name="genre4" value="radioValue">
Action</label>
<br>
<label>
<input type="radio" name="genre5" value="radioValue">
Eventyr</label>
</p></td>
<tr><td>Top 3games:</td>
<td><a><font color="#006600">Start med nr. 1</font></a></td>
<tr><td>Number 1</td>
<td><input type=text name="top1"></td>
<tr><td><a>Number 2</a></td>
<td><input type=text name="top2"></td>
<tr><td><a>Nubmer 3</a></td>
<td><input type=text name="top3"></td>
<tr><td>Din skill:</td>
<td><select name="skill"><option>vælg skill</option><option>Novice</option><option>Average</option><option>Experienced</option><option>Skilled</option><option>Masterful</option></select></td>
<tr><td><a>Nick name:</a></td>
<td><input type=text name="nick"></td>
<tr><td><font color="#aa0000"><strong>Kontakt:</strong></font></td>
<td><hr align="left" size="2" width="80%" color="#003399"></td>
<tr><td><a>Chat program:</a></td>
<td><p>
<label>
<input type="radio" name="chat1" value="radioValue">
ICQ</label>
<br>
<label>
<input type="radio" name="chat2" value="radioValue">
Trillian</label>
<br>
<label>
<input type="radio" name="chat3" value="radioValue">
MSN</label>
</p></td>
<tr><td><a>Chat nummer:</a></td>
<td><input type=text name="nummer"></td>
<tr><td><a>E-mail:</a></td
><td><input type=text name="mail"></td>
<tr><td><a>Url:</a></td>
<td><input type=text name="url"></td>
</tr>
<tr>
<tr><td><a>Password:</a></td>
<td><input type=text name="passw"></td>
<tr>
<td valign="top"><a>Kommentar:</a></td>
<td><textarea name="text" rows="5"></textarea></td>
</tr>
<tr><td></td><td><input type=submit value=Send></td></form></tr></table>
Script:
<?
$subject = "emne";
$headers .= "fornavn";
$headers .= "efternavn";
$headers .= "by";
$headers .= "alder";
$headers .= "udd";
/* sender personlig oplysning */
$headers .= "fabrikant";
$headers .= "proccessor1";
$headers .= "proccessor2";
$headers .= "mhz";
$headers .= "ram";
$headers .= "grafik";
/* sender com info */
$headers .= "genre1";
$headers .= "genre2";
$headers .= "genre3";
$headers .= "genre4";
$headers .= "genre5";
$headers .= "top1";
$headers .= "top2";
$headers .= "top3";
$headers .= "skill";
$headers .= "nick";
/* sender game info */
$headers .= "chat1";
$headers .= "chat2";
$headers .= "chat3";
$headers .= "nummer";
$headers .= "mail";
$headers .= "url";
$headers .= "passw";
$headers .= "text";
/* sender kontakt info */
$headers .= "From: mailingliste@mail.dk\r\n";
$headers .= "Reply-to: klaus@d-struct.dk\r\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
$modtager[] = "klaus@d-struct.dk";
for($i = 0; $i < count($modtager); $i++) {
$success = mail($modtager[$i], $emne, "$fornavn, $efternavn, $by, $alder, $udd, $fabrikant, $proccessor1, $proccesor2, $mhz, $ram, $grafik, $genre1, $genre2, $genre3, $genre4, $genre5, $top1, $top2, $top3, $skill, $nick, $chat1, $chat2, $chat3, $nummer, $mail, $url, $passw, $text", $header);
if($success) {
echo "<a><font color=#006600><strong>Dine oplysninger er sendt og godkendt</strong></font></a>";
}
else {
echo "<a><font color=#FF0000><strong>Oplysningerne blev ikke sendt af Mosegrisens server</strong></font></a><BR>";
}
}
?>