Hallo,
ich habe ein Problem, mal wieder^^.
Und zwar wollte ich per Formular eine Email versenden. Und vorher wollte ich noch testen, ob alle Pflichtfelder ausgefüllt worden sind.
Formular.php:
Send.php:
Egal ob ich Die Pflichfelder offen lasse oder ausfülle, er schickt keine Email ab. Es kommt immer Go back!
Danke für die hilfe.
Gruss Rambo51
ich habe ein Problem, mal wieder^^.
Und zwar wollte ich per Formular eine Email versenden. Und vorher wollte ich noch testen, ob alle Pflichtfelder ausgefüllt worden sind.
Formular.php:
HTML:
<form method="post" action="send.php">
<table width="100%" bgcolor="#615B30" cellspacing="1">
<tr bgcolor="#B0A755">
<td width="160" height="25">Clan:<font color="#FF0000">*</font></td>
<td width="387"><input class="input" type="text" size="35" name="Clan"></td>
</tr>
<tr bgcolor="#B7AE64">
<td height="25">Clantag:<font color="#FF0000">*</font></td>
<td><input class="input" type="text" size="15" name="Clantag"></td>
</tr>
<tr bgcolor="#B0A755">
<td height="25">Contact ICQ:</td>
<td><input class="input" type="text" name="Contact ICQ" size="15" value="xxx-xxx-xxx"></td>
</tr>
<tr bgcolor="#B7AE64">
<td height="25">Contact e-Mail:<font color="#FF0000">*</font></td>
<td><input class="input" type="text" size="35" name="Contact e-Mail"></td>
</tr>
<tr bgcolor="#B0A755">
<td height="25">X vs. X:<font color="#FF0000">*</font></td>
<td><select class="input" name="X vs X">
<option selected>2 vs. 2</option>
<option>3 vs. 3</option>
<option>4 vs. 4</option>
<option>5 vs. 5</option>
<option>6 vs. 6</option>
</select>
</td>
</tr>
<tr bgcolor="#B7AE64">
<td height="25">Your Clan Homepage:</td>
<td><input class="input" type="text" size="45" name="Your Clan Homepage"></td>
</tr>
<tr bgcolor="#B0A755">
<td height="25">Tracker:</td>
<td><input class="input" type="text" size="45" name="Tracker"></td>
</tr>
<tr bgcolor="#B7AE64">
<td height="25">Server:<font color="#FF0000">*</font></td>
<td><select class="input" name="Server">
<option selected>Yes</option>
<option>No</option>
</select>
</td>
</tr>
<tr bgcolor="#B0A755">
<td height="25">Other...:</td>
<td><textarea class="textarea" name="Other" cols="45" rows="5"></textarea><br></td>
</tr>
<tr bgcolor="#B7AE64">
<td height="25" colspan="2" valign="top"><center><input class="input" type="submit" name="submit" value="Fight US"><input class="input" type="reset" name="reset" value="Reset"></center></td>
</tr>
<tr bgcolor="#B0A755">
<td height="25" colspan="2">Necessary fields are marked with an <font color="#FF0000">*</font></td>
</tr>
</table>
</form>
Send.php:
PHP:
<?php
if ($_REQUEST['submit'])
{
if (($_REQUEST['Clan'] == '') ||
($_REQUEST['Clantag'] == '') ||
($_REQUEST['Contact e-Mail'] == '') ||
($_REQUEST['X vs X'] == '') ||
($_REQUEST['Server'] == ''))
{
echo "Go <a href=\"javascript:history.back();\">back</a>!";
}
else
{
mail("mcrambo10@aol.com", "Report", "Blablub", "From: TestMailer");
echo "Thanks for Mail!";
}
}
else
{
echo "Error: Go<a href=\"javascript:history.back();\">Back</a>.";
}
?>
Egal ob ich Die Pflichfelder offen lasse oder ausfülle, er schickt keine Email ab. Es kommt immer Go back!
Danke für die hilfe.
Gruss Rambo51