Check the living example.
comment.php
<!DOCTYPE html> <!-- comment.php --> <html lang="en"> <head> <meta charset="utf-8" /> <title>Make a comment</title> </head> <body> <h1>Make a comment</h1> <form action="save_comment.php" method="post"> <p> Name: <input type="text" name="name" /> <br /> Email: <input type="email" name="email" /> <br /> Comment: <textarea name="comment" rows="10" cols="60"></textarea> <br /> <input type="submit" value="Send comment" /> </p> </form> </body> </html>
save_comment.php
<!DOCTYPE html> <!-- save_comment.php --> <html lang="en"> <head> <meta charset="utf-8" /> <title>Make a comment</title> </head> <body> <h1>Make a comment</h1> <p> Thank you for your participation! We have registered your comment in our database: </p> <ul> <li>Name: <strong><?php echo $_POST['name']; ?></strong> </li> <li>Email: <strong><?php echo $_POST['email']; ?></strong> </li> <li>Comment: <strong><?php echo $_POST['comment']; ?></strong> </li> </ul> </body> </html>