Formular i PHP
Jeg har lavet en formular i PHP hvor meget data bliver sendt til en mail, men ganske normal formular. problemet er bare at når man har udfyldt og trykker send så siger den:Warning: mail() expects at most 5 parameters, 23 given in c:\program files\apache group\apache\htdocs\mg network_new\formular_tilmelding.php on line 47
Oplysningerne blev ikke sendt af Mosegrisens server
formular:
<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="proccessor" value="radio">
Pentium</label>
<br>
<label>
<input type="radio" name="proccessor" value="radio">
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="genre" value="radio">
Strategi</label>
<br>
<label>
<input type="radio" name="genre" value="radio">
Shoot'em up</label>
<br>
<label>
<input type="radio" name="genre" value="radio">
Rollespil</label>
<br>
<label>
<input type="radio" name="genre" value="radio">
Action</label>
<br>
<label>
<input type="radio" name="genre" value="radio">
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="chat" value="radio">
ICQ</label>
<br>
<label>
<input type="radio" name="chat" value="radio">
Trillian</label>
<br>
<label>
<input type="radio" name="chat" value="radio">
MSN</label>
</p></td>
<tr><td><a>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>
<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>
PHP kode:
<?
$header .= "fornavn";
$header .= "efternavn";
$header .= "by";
$header .= "alder";
$header .= "udd";
/* sender personlig oplysning */
$header .= "fabrikant";
$header .= "proccessor";
$header .= "mhz";
$header .= "ram";
$header .= "grafik";
/* sender com info */
$header .= "genre";
$header .= "top1";
$header .= "top2";
$header .= "top3";
$header .= "skill";
$header .= "nick";
/* sender game info */
$header .= "chat";
$header .= "nummer";
$header .= "mail";
$header .= "url";
$header .= "text";
/* sender kontakt info */
$header .= "From: mailingliste@mail.dk\r\n";
$header .= "Reply-to: klaus@d-struct.dk\r\n";
$header .= "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], $fornavn, $efternavn, $by, $alder, $udd, $fabrikant, $proccessor, $mhz, $ram, $grafik, $genre, $top1, $top2, $top3, $skill, $nick, $chat, $nummer, $mail, $url, $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>";
}
}
?>
Jeg kan godt se den kun kan sende 5 headers men hvordan kan jeg gøre sådan at den sender det hele, for det er jo hele 23 headers der skal sendes til min mail ??????