Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 14th, 2012  |  syntax: None  |  size: 0.55 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.                         $napaka .= $vrednost[1].'<br />';
  9.                         $poslji = FALSE;
  10.                 }
  11.                 if($ime == 'Email') {
  12.                         if (!filter_var($_POST[$ime][0], FILTER_VALIDATE_EMAIL)){
  13.                 $napaka .= $vrednost[1].'<br />';
  14.             }
  15.                 }
  16.         }