Advertisement
Guest User

Untitled

a guest
May 14th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. foreach($_POST as $ime=>$vrednost) {
  2. if($ime == 'Potrdi') { continue; }
  3.  
  4. $ime_post .= $ime;
  5. $vsebinatxt .= $ime . ': '. $vrednost[0] . "\n";
  6. if($vsebinatxt == '') { continue; }
  7. if(isset($vrednost[1]) AND ($vrednost[0] == '' OR $vrednost[0] == '0')) { // preveri hidden polja, če so določena,pomeni, da je polje obvezno
  8. #if($ime == 'Email') { continue; }
  9. $napaka .= $vrednost[1].'<br />';
  10. $poslji = FALSE;
  11. }
  12. if($ime == 'Email') {
  13. $email == $_POST['Email'][0];
  14. if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$",$email)) {
  15. $napaka .= $vrednost[1].'<br />';
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement