Exemplo n.º 1
0
     $nickExists = DBhandler::brawlerExists('Nick', $nick);
     if ($nickExists) {
         $formNickFeedback = '<span class="warning">Nicket "<em>' . $nick . '</em>" er tatt!</span>';
         $datasetValidert = false;
     } else {
         $formNickValue = $nick;
     }
     //slutt if $nickExists
 }
 //slutt preg_match nick
 $email = trim($_POST['formEmail']);
 if (!preg_match('/^[s][1-9][0-9]{5}+@stud\\.hioa\\.no$/', $email)) {
     $formEmailFeedback = '<span class="warning">Kun HiOA-studenteposter tillatt</span>';
     $datasetValidert = false;
 } else {
     $emailExists = DBhandler::brawlerExists('Email', $email);
     if ($emailExists) {
         $formEmailFeedback = '<span class="warning">Epostadressen "<em>' . $email . '</em>" er allerede registrert!</span>';
         $datasetValidert = false;
     } else {
         $formEmailValue = $email;
     }
     //slutt if $emailExists ;
 }
 //slutt preg_match email
 $charno = $_POST['formSSBChar'];
 if (!ctype_digit($charno)) {
     $formSSBCharFeedback = '<span class="warning">Du må velge en karakter</span>';
     $datasetValidert = false;
 }
 //slutt ctype_digit($charno)