![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 9 Pomógł: 0 Dołączył: 1.08.2010 Ostrzeżenie: (0%) ![]() ![]() |
Prosze o pomoc.Nie wiem jak zrobic aby jak funkcja chekEmail wskazała true to po wciśnieciu przycisku "SPRWADZ POPRAWONOSC EMAILA" wyswietliło mi zmienna $a i tak samo (false => $b)
<?php $a = "email jest prawidłowy"; $b = "email jest nie prawidlowy"; $email = "xxx.xxx@onet.eu"; function checkEmail($email) { if( !preg_match( "/^([a-zA-Z0-9])+([a-zA-Z0-9._-])*@([a-zA-Z0-9_-])+ ([a-zA-Z0-9._-]+)+$/", $email)) { return false; } else { return true; } } var_dump(function checkEmail); ?> <html> <br/> <form action="" method="get"> EMAIL: <input type="text" name="email" /><br/><br/> <input type="submit" name="submit" value="SPRWADZ POPRAWONOSC EMAILA" /> </html> Z góry dziekuje za pomoc |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 21:49 |