By TECHIE Sat, 04/25/2009 - 15:37
he $_POST variable is used to collect values from a form with
method="post".
The $_POST Variable
The $_POST variable is an array of variable names and values sent by the HTTP
POST method.
The $_POST variable is used to collect values from a form with method="post".
Information sent from a form with the POST method is invisible to others and has
no limits on the amount of information to send.
By TECHIE Sat, 04/25/2009 - 15:35
The $_GET variable is used to collect values from a form with
method="get".
The $_GET Variable
The $_GET variable is an array of variable names and values sent by the HTTP GET
method.
The $_GET variable is used to collect values from a form with method="get".
Information sent from a form with the GET method is visible to everyone (it will
be displayed in the browser's address bar) and it has limits on the amount of
information to send (max. 100 characters).
By TECHIE Sat, 04/25/2009 - 15:30
The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.
PHP Form Handling
The most important thing to notice when dealing with HTML forms and PHP is
that any form element in an HTML page will automatically be available to your PHP scripts.
Form example:
By TECHIE Sat, 04/25/2009 - 15:28
The real power of PHP comes from its functions.
In PHP - there are more than 700 built-in functions available.
PHP Functions
In this tutorial we will show you how to create your own functions.
For a reference and examples of the built-in functions, please visit our
PHP Reference.
Create a PHP Function
A function is a block of code that can be executed whenever we need it.
Creating PHP functions:
By TECHIE Sat, 04/25/2009 - 15:25
Looping statements in PHP are used to execute the same block of
code a specified number of times.
Looping
Very often when you write code, you want the same block of code to run a
number of times. You can use looping statements in your code to perform this.
In PHP we have the following looping statements:
By TECHIE Sat, 04/25/2009 - 15:22
An array can store one or more values in a single variable name.
What is an array?
When working with PHP, sooner or later, you might want to create many similar variables.
Instead of having many similar variables, you can store the data as elements in an array.
Each element in the array has its own ID so that it can be easily accessed.
There are three different kind of arrays:
By TECHIE Sat, 04/25/2009 - 15:20
The Switch statement in PHP is used to perform one of several different actions based on one of several different conditions.
The Switch Statement
If you want to select one of many blocks of code to be executed, use the Switch statement.
The switch statement is used to avoid long blocks of if..elseif..else code.
By TECHIE Sat, 04/25/2009 - 15:17
The if, elseif and else statements in PHP are used to perform different actions based on different conditions.
Conditional Statements
Very often when you write code, you want to perform different actions for different decisions.
You can use conditional statements in your code to do this.
By TECHIE Sat, 04/25/2009 - 15:13
Operators are used to operate on values.
PHP Operators
This section lists the different operators used in PHP.
Arithmetic Operators
By TECHIE Sat, 04/25/2009 - 15:08
A string variable is used to store and manipulate a piece of text.
Strings in PHP
String variables are used for values that contains character strings.
In this tutorial we are going to look at some of the most common functions and operators used to manipulate strings in PHP.
After we create a string we can manipulate it. A string can be used directly in a function or it can be stored in a variable.
Below, the PHP script assigns the string "Hello World" to a string variable called $txt: