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