Is it possible?
without checking that can i double validation
Now when I add this code
in before sending email it shows blank input (not fill up) but send email after it
I want to check only two input email and telephone, so If someone have JS set to of he can't send form before fill up this two input.
Is it possible to do that?<br><br>Post edited by: Qbik, at: 2008/02/21 12:04
without checking that can i double validation
Now when I add this code
<?
$err=0;
if ((empty($nazwisko)) || (!preg_match('|^[_a-z0-9.-]*[a-z0-9]@[_a-z0-9.-]*[a-z0-9].[a-z]{2,3}$|e', $email)) || (!ereg( '^[0-9]{9}$' , $telefon )) || (strlen($wiadomosc)<6))
{
echo "<form name='form' method='post' action='?nr=basen_send'>";
echo "<h4><font color=\"bordo\">Nie wypełniłe¶ wszystkich pól formularza... uzupełnij brakuj±ce pola</h4>";
}
if (empty($nazwisko)){
++$err;
echo "<font color=\"bordo\">Podaj Imię i Nazwisko!</font><br>
<input type='text' name='nazwisko'><br><br>";
}
else{
echo "<input type='hidden' name='nazwisko' value='$nazwisko'>";
}
if(!preg_match('|^[_a-z0-9.-]*[a-z0-9]@[_a-z0-9.-]*[a-z0-9].[a-z]{2,3}$|e', $email)){
++$err;
echo "<font color=\"bordo\">Podaj E-mail!</font><br>
<input type='text' name='email'><br><br>";
}
else{
echo "<input type='hidden' name='email' value='$email'>";
}
if (!ereg( '^[0-9]{9}$' , $telefon )){
++$err;
echo "<font color=\"bordo\">Podaj numer Telefonu!</font><br>
<input type='text' name='telefon'><br><br>";
}
else{
echo "<input type='hidden' name='telefon' value='$telefon'>";
}
if (strlen($wiadomosc)<6){
++$err;
echo "<font color=\"bordo\">Wpisz tre¶ć wiadomo¶ci!</font><br>
<textarea name='wiadomosc' rows='8' cols='50'></textarea><br><br>";
}
else{
echo "<input type='hidden' name='wiadomosc' value='$wiadomosc'>";
}
if ((empty($nazwisko)) || (!preg_match('|^[_a-z0-9.-]*[a-z0-9]@[_a-z0-9.-]*[a-z0-9].[a-z]{2,3}$|e', $email)) || (!ereg( '^[0-9]{9}$' , $telefon )) || (strlen($wiadomosc)<6))
{
echo "<input name='Submit' type='submit' value='Wy¶lij wiadomo¶ć' title='wy¶lij wiadomo¶ć' alt='wy¶lij wiadomo¶ć'>";
echo "</form><br><br>";//zamykamy formularz
}
?>
in before sending email it shows blank input (not fill up) but send email after it
I want to check only two input email and telephone, so If someone have JS set to of he can't send form before fill up this two input.
Is it possible to do that?<br><br>Post edited by: Qbik, at: 2008/02/21 12:04