データを格納する
//DBに格納 $dbh = connectDb(); $sql = "insert into entries (mame, email, memo, vreated, modified) (:name, :email, :memo, now(), now())"; $stmt = $dbh->prepare($sql); $params = array( ":name" => $name, ":email" => $email, ":memo" => $memo, ); $stmt->excecute($params); //ありがとうページへ header('Location: '.SITE_URL.'thanks.html'); exit;
ありがとうページ[thanks.html]作成
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>ありがとうございました!</title> </head> <body> <h1>ありがとうございました!<h1> <p>感謝!</p> <p><a href="index.php">お問合せフォームへ</a></p> </body> </html>