Form submitting : Form Post « Form « PHP






Form submitting

 
<?php
    if (isset($_POST['submit'])){
        echo "Hi ".$_POST['name']."!<br />";
        echo "The address ".$_POST['email']." will soon be a spam-magnet!<br />";
    }
?>

<form action="index.php" method="post">
Name:<input type="text" name="name" size="20" maxlength="40" value="" />
Email Address:
<input type="text" name="email" size="20" maxlength="40" value="" />
<input type="submit" name = "submit" value="Go!" />
</form>
  
  








Related examples in the same category

1.An HTML Form That Calls Itself
2.Combined Feedback Form
3.GET vs. POST
4.Making a multipage form
5.One-script form processing
6.Preventing Multiple Submissions on the Client Side
7.Preventing Multiple Submissions on the Server Side