Get latest news and Web Designing tutoria

Friday, 29 May 2015

HTML Forms and PHP

If you know a little HTML, then you know that the FORM tags can be used to interact with your users. Things that can be added to a form are the likes of text boxes, radio buttons, check boxes, drop down lists, text areas, and submit buttons. A basic HTML form with a textbox and a Submit button looks like this:
<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>
We won't explain what all the HTML elements do, as this is a book on PHP. Some familiarity with the above is assumed. But we'll discuss the METHOD, ACTION and SUBMIT attributes in the form above, because they are important

Related Posts:

  • PHP Not Equal To PHP Not Equal To In the previous you saw what Comparison Operators were. In this lessons, we'll explore the Comparison Operator for Not Equal To: !=.So open up your text editor, and add the following script: … Read More
  • PHP Less Than, Greater Than The Less Than ( < ) and Greater Than ( > ) symbols come in quite handy. They are really useful in loops (which we'll deal with in another section), and for testing numbers in general. Suppose you wanted to test … Read More
  • if ... else Statements in PHP The syntax for the if else statement is this: if (condition_to_test) { } else { } If you look at it closely, you’ll see that you have a normal If Statement first, followed by an “else” part after it. Here’s the “els… Read More
  • PHP Comparison Operators  PHP Comparison Operators You saw in the last section how to test what is inside of a variable. You used if, else … if, and else. You used the double equals sign (==) to test whether the variable was the same thin… Read More
  • PHP if ... else if Statements Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 … Read More

0 comments:

Post a Comment