Hi Coudl somebody tell me what is wrong with hte attached code ?
It always displays the index.php file (the starting file). Even ig all condisions are complete. LP JaN www.3delavnica.com
<title>Jan</title> <font face="Verdana"> <h2>Če me želiš kontaktirati, spodaj napiši svoj e-mail in sporočilo !</h2> <form name="form1" method="post" action="rez.php"> <p> <b>E-mail:</b> <br><input style="text" name="email" size="55"> <br> <br><b>Sporočilo (uporabljate lahko tudi HTML kodo) :</b> <br><textarea name="kom" rows="10" cols="42"></textarea> <br> <br><input type="submit" name="submit" value="Pošlji"> <input type="reset" name="reset" value="Pobriši"> </form>
<font face="verdana"> <? $ema = $_POST[email]; $spo = $_POST[kom]; if (empty($ema) and empty($spo) or empty($ema) and isset($spo) or isset($ema) and empty($spo)) { zavrni(); } else { naprej(); } function naprej() { if (ereg("@", $ema) and ereg(".", $ema)) { mail('[EMAIL PROTECTED]', "Sporočilo od $ema", "<html><body><p>$spo</p></body></html>", "To: Jan Hančič <[EMAIL PROTECTED]>\n". "From: $ema <$ema>\n" . "MIME-Version: 1.0\n". "Content-type: text/html; charset=iso-8859-2"); echo "<b>Sporočilo poslano !</b>"; } else { zavrni(); } } function zavrni() { echo "<b>Niste vpisali vseh podatkov ali pa je e-mail napisan v nepravilni obliki !!</b>"; echo "<p></p>"; include("index.php"); } ?>
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php