Computer Science Canada [Tutorial] Very Basic |
Author: | octopi [ Sun Jun 01, 2003 12:31 am ] | ||||||||||||||||||||||||
Post subject: | [Tutorial] Very Basic | ||||||||||||||||||||||||
Basic Tutorial The most basic php program
To print data, you can use either the print, echo, or header function. Header is used to output headers to the browser.
Print and echo are used to output data.
Varibles:
Getting data from the user: There are two methods to get data from the user, GET, and POST When someone accesses your program like this program.php?name=SOMETHING That is using the GET method. When someone uses a form it can either be in GET, or POST
OR
To access these varibles you can do:
or this:
the above will get the GET, and POST methods (usually there is only one method used at a time, so it shouldn't be a problem) Conditionals:
|