progetto di prova che mostra le macchine fiat e un form che permette di contattare
filippo.bertilotti
2024-04-30 4b29bea01029887790358c6cf93f3fee05eedd43
pagina template conferma con controllo su reindirizzamento
1 files added
1 files modified
33 ■■■■ changed files
htdocs/contact.php 16 ●●●● patch | view | raw | blame | history
ihtml/conferma.tpl 17 ●●●●● patch | view | raw | blame | history
htdocs/contact.php
@@ -7,7 +7,7 @@
    $smarty->setCompileDir('../compile');
    $errorMsgs = [];
    $errorCheck = false;
    $errorCheck = true;
    $number = $_POST['number'] ?? '';
    $email = $_POST['email'] ?? '';
@@ -58,11 +58,6 @@
            insertDataOnTable($conn, $email, $number);
        }
        if ($errorCheck == false) {
            $msg = "La contattatteremo presto!";
        }
    }
    
    
@@ -70,8 +65,13 @@
    $smarty->assign('cellNumber', $number);
    $smarty->assign('email', $email);
    $smarty->assign('formMsg', $msg);
    $smarty->assign('errorMsgs', $errorMsgs);
    $smarty->display('contact.tpl');
    if($errorCheck == false) {
        $smarty->display('conferma.tpl');
    }else {
        $smarty->display('contact.tpl');
    }
?>
ihtml/conferma.tpl
New file
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tipo</title>
    <link rel="stylesheet" href="files_comuni/style/style.css">
</head>
<body>
    {include file="header.tpl"}
    <main>
        {* messaggio di conferma *}
        La richiesta da lei effettuata รจ andata a buon fine!
    </main>
    {include file="footer.tpl"}
</body>
</html>