HTML form for submitting data : Form « Form « PHP






HTML form for submitting data

 
<form method="POST" action="index.php">
Your Name: <input type="text" name="user">
<br/>
<input type="submit" value="Say Hello">
</form>


//Dynamic data

//index.php
<?php
print "Hello, ";
// Print what was submitted in the form parameter called 'user'
print $_POST['user'];
print "!";
?>
  
  








Related examples in the same category

1.print a radio button or checkbox
2.print a select menu
3.print a submit button
4.print a text box
5.print a textarea
6.HTML elements for use in forms
7.HTML Form Elements
8.Working with Multipage Forms
9.Process the results