Forms and PHP : Form Data « Form « PHP






Forms and PHP

 
//index.htm
<html>
<body>
<form action="index.php" method="post">
Your Name:<br>
<input type="text" name="name" size="20" maxlength="20" value=""><br>
Your Email:<br>
<input type="text" name="email" size="20" maxlength="40" value=""><br>
<input type="submit" value="go!">
</form>
</body>
</html>


//index.php
<html>
<head>
<title></title>
</head>
<body>
<?
    print "Hi, $name!. Your email address is $email";
?>
</body>
</html>
  
  








Related examples in the same category

1.Deal with Array Form Data
2.A process_form() Function
3.Access widget's form value
4.Accessing multiple submitted values
5.Calculation based on form data
6.Feedback Form
7.Handling Special Characters
8.multivalue-forms.php
9.Saying "Hello"