Working with HTML Forms
1. The HTML Form
<html>
<head>
<title>A BASIC HTML FORM</title>
</head>
<body>
<FORM NAME ="form1" METHOD =" " ACTION = "">
<INPUT TYPE = "TEXT" VALUE ="username">
<INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login">
</FORM>
</body>
</html>
6. Getting values from a Text Box
<INPUT TYPE = "Text" VALUE ="username" NAME = "username">
When you submit the form butoon you can get the value of textbox on the same page or the page whose name you given in action tag of form.
The value of text field will gte by the name of the textfield that is "username"
<?
echo $_POST["username"]; // If form submit by POST method
echo $_GET["username"]; // If form submit by GET method
echo $_REQUEST["username"]; // Works for both POST and GET method of form
?>
7. Checking if the Submit button was clicked
We are assuming that form is submitted by POST method
<?
if (isset($_POST['Submit'])) { }
// isset() Its a php function that check wheather a variable is set or empty.
?>
Php Discussion
- - PHP 4 or 5 as a Deploymen
- - How do I decode a html/ph
- - PHP help
- - What is wamp?
- - How to execute a php file
Php Source Code
- - Wraps A String To A Given
number Of Characters Using A
string Break Character - - Uppercase The First Character
of Each Word In A String - - Make A String's First Character
uppercase - - Strip Whitespace (or Other
characters) From The Beginning
and End Of A String - - Return Part Of A String



