| | |
| | | $number = $_GET['number'] ?? ''; |
| | | $email = $_GET['email'] ?? ''; |
| | | |
| | | if(!is_numeric($number) && strlen($number) != 10) { |
| | | $error['number'] = 'Numero di telefono non corretto'; |
| | | } |
| | | |
| | | if(true) { |
| | | $error['email'] = 'email non valida'; |
| | | } |
| | | |
| | | if(!is_numeric($number) || strlen($number) != 10) { |
| | | $error['number'] = 'Numero di telefono non corretto'; |
| | | }else { |
| | | $error['number'] = ''; |
| | | } |
| | | |
| | | if(!filter_var($email, FILTER_VALIDATE_EMAIL)) { |
| | | $error['email'] = 'Email non valida'; |
| | | } else { |
| | | $error['email'] = ''; |
| | | } |
| | | |
| | | $smarty->assign('cellNumber', $number); |
| | | $smarty->assign('email', $email); |
| | | |
| | | $smarty->assign('error', $error); |
| | | |
| | | |
| | | $smarty->display('contact.tpl'); |
| | | ?> |