implementazione connessione al database mysql (da risolvere problema exception mysql
| | |
| | | $number = $_GET['number'] ?? ''; |
| | | $email = $_GET['email'] ?? ''; |
| | | |
| | | function DB_connect() { |
| | | $conn = new mysqli('127.0.0.1', 'root', ''); |
| | | if(!$conn) { |
| | | die('Connessione fallita:' . mysqli_connect_error()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | if(!is_numeric($number) || strlen($number) != 10) { |
| | | $error['number'] = 'Numero di telefono non corretto'; |
| | | }else { |
| | |
| | | $error['email'] = ''; |
| | | } |
| | | |
| | | DB_connect(); |
| | | |
| | | $smarty->assign('cellNumber', $number); |
| | | $smarty->assign('email', $email); |
| | | |