Mega Code Archive

 
Categories / Php / Form
 

Reading Input from the Form

<html> <head> <title>A Simple HTML Form</title> </head> <body> <div> <form action="index.php" method="get"> <p><input type="text" name="user" /></p> <p><textarea name="address" rows="5" cols="40"> </textarea></p> <p><input type="submit" value="hit it!" /></p> </form> </div> </body> </html> // index.php <html> <body> <div>  <?php   print "Welcome <b>" . $_GET ['user'] . "</b><br/>\n\n";   print "Your address is: <br/><b>" . $_GET ['address'] . "</b>";   ?>  </div> </body> </html>