Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "examkc_admin";
- $password = "baltictraining1";
- $dbname = "examkc_guestBook";
- // Create connection
- $conn = mysqli_connect($servername, $username, $password, $dbname);
- $name = htmlspecialchars($_REQUEST["name"]);
- $email = htmlspecialchars($_REQUEST["email"]);
- $comment = htmlspecialchars($_REQUEST["comment"]);
- $date = date('y-m-d');
- mysqli_query($conn , "INSERT INTO Entry (Guest_Name, Guest_Email, Comment, Date_Comment_Left)
- VALUES ('$name','$email','$comment','$date')");
- //echo "Hello $name, Thank you for commenting! Your comment was ---- $comment ---- and a copy has been send to $email.";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement