ich habe ein Formular geschrieben und habe jetzt ein klitze kleines Problem, dass ihr warscheinlich schnell löst.
Und zwar habe ich in dem Formular geschrieben, dass man bestimmte Felder schreiben muss um es dann zu versenden. Aber wenn man, dass nicht macht soll eine Fehlermeldung erscheinen, aber sie tut es nicht. Ich habe if und else benutzt also if, wenn es erfolgreich war und else, wenn nicht.
Ich poste nochmal meinen Code vielleicht könnt ihr daran den Fehler erkennen.
<?php
include \"header.inc.php\";
?>
<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"549\">
<tbody>
<tr>
<td><img src=\"img/content_head.gif\" height=\"25\" width=\"549\"></td>
</tr>
<tr>
<td background=\"img/content_bg.gif\">
<!--NEws Start-->
<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\">
<tbody>
<tr>
<td class=\"Callg\"><br>
<table class=\"Callg\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">
<tbody>
<tr>
<td><b><font size=\"4\">Join Us</font></b></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td>
<?php
echo get_cfg_var(\"smtp\");
if($Wunsch != \"\" AND $Name != \"\" AND $Email != \"\"){
$result = mail(\"d.muellenstedt@onlinehome.de\",\"Join Us\",\"
Wunschnick: $Wunsch
Name: $Name
Email: $Email
ICQ: $ICQ
MSN: $MSN
AIM: $AIM
Yahoo: $Yahoo
Geschlecht: $Geschlecht
Alter: $Alter
Wohnort: $Wohnort
Letzte(r) Clan(s): $Clan
Squad: $Squad
Warum zu uns?: $Warum
Was wir wissen müssen: $Was\");
if($result)
{
echo \"versandt war erfolgreich\";
}
else
{
echo \"nicht versandt\";
}
}
?> <a href=\"joinus-form.php\">Zurück</a>
</td>
</tr>
</tbody>
</table>
<!--News Ende-->
<br>
<br>
<div align=\"center\"></div>
</td>
</tr>
</tbody></table></td>
</tr>
<tr>
<td><img src=\"img/content_foot.gif\" height=\"21\" width=\"549\"></td>
</tr>
</tbody>
</table>
</td>
<?php
include \"footer.inc.php\";
?>

