Mam taki formularz
<?php
if (isset($_POST['submit'])) {
if (function_exists(escape_data))
{
}
function escape_data ($data)
{
{
}
}
//sprawdzenie pola wiadomosc
$message = NULL;
if (empty($_POST['imie'])) { $i = FALSE;
$message .= 'Musisz podac imie!<br>';
} else {
}
//sprawdzenie pola temat
if (empty($_POST['opis'])) { $o = FALSE;
$message .= 'Musisz wpisac opis!<br>';
} else
{
}
//sprawdzenie pola temat
if (empty($_POST['email'])) { $e = FALSE;
$message .= 'Musisz wpisac email!<br>';
}
{
$message .= 'Podales zly adres e-mail';
}
else
{
}
if($i && $o && $e)
{ //jesli ok
mail('darek_r1@tlen.pl','Ankieta',$o); }
}
?>
<?php
{
echo '<font color="red" size="-1">', $message, '</font>'; }
?>
<link href="form.css" rel="stylesheet" type="text/css">
<form method="post" action="
<?php echo "index1.php?p=ankieta"; ?>" >
<p align="center">Imie <input type="text" name="imie" maxlength="10" class="form" value="
<?php if (isset($_POST['imie'])) echo $_POST['imie']; ?>"><br><br>
Email <input type="text" name="email" maxlength="20" class="form" value="
<?php if (isset($_POST['email'])) echo $_POST['email']; ?>"><br>Komentarz<br>
<textarea rows="10" cols="20" class="form" name="opis" class="form"></textarea><br><br>
<input type="submit" name="submit" value="Ok"></form>
</p>
</form>
Nie chce działać.Błąd jest gdzieś tutaj tylko nie porafię go naprawić:
Kod
if($i && $o && $e)
{ //jesli ok
mail('darek_r1@tlen.pl','Ankieta',$o);
echo 'ok';
}
Proszę o pomoc
Masz szczęscie, że jesteś Gościem... (IMG:
http://forum.php.pl/style_emoticons/default/winksmiley.jpg) /tiraeth/
(IMG:
http://tiraeth.kom.pl/_tmp/phppl/uwaga.gif)
Ten post edytował tiraeth 6.03.2006, 11:37:05