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