htdocs/contact.php | ●●●●● patch | view | raw | blame | history | |
ihtml/contact.tpl | ●●●●● patch | view | raw | blame | history |
htdocs/contact.php
@@ -7,16 +7,20 @@ $smarty->setCompileDir('../compile'); if(!empty($_GET['prova'])) { if(is_numeric($_GET['prova']) && strlen($_GET['prova']) == 10) { $string = $_GET['prova']; if(!empty($_GET['number']) && !empty($_GET['email'])) { if(is_numeric($_GET['number']) && strlen($_GET['number']) == 10) { $number = $_GET['number']; $email = $_GET['email']; }else { $string = 'Numero di telefono non corretto'; $number = 'Numero di telefono non corretto'; $email = ''; } }else { $string = ''; $number = ''; $email = ''; } $smarty->assign('provastring', $string); $smarty->assign('cellNumber', $number); $smarty->assign('email', $email); $smarty->display('contact.tpl'); ?> ihtml/contact.tpl
@@ -11,10 +11,14 @@ <main> {* FORM *} <form action="contact.php"> <input type="text" name="prova" placeholder="metti qualcosa"> Inserisci l'email: <input type="email" name="email" placeholder="inserisci l'email"> <br> Inserisci il numero: <input type="text" name="number" placeholder="inserisci il numero"> <br> <button type="submit">clicca qui</button> </form> {$provastring} {$cellNumber} {$email} </main> {include file="footer.tpl"} </body>