WEEK 9 - PHP Exercise

By using PHP form is really good at handling the data and submitted to the server in HTML forms. Its allow user to enter their data into the webpage, on the server we can use PHP page along with the form collection to handle the information set.

For example,

<Form METHOD= "GET"
          ACTION= "process.php">

Two main attribute in form are :
1. METHOD
- Get/post

2.ACTION
- use to specify the target which is where the data is to be transmitted.
- Typically the target is a file that contain code for processing

In this week class, we learn about how to use echo and print statement in PHP.  We take the example from w3school and we go through it.

The different between echo and print
Echo and print are more or less the same. They are both used to output data to the screen.

The differences are small: echo has no return value while print has a return value of 1 so it can be used in expressions. echo can take multiple parameters (although such usage is rare) while print can take one argument. echo is marginally faster than print.

Comments

Popular posts from this blog

WEEK 7 - Introduction to PHP

WEEK 6 - Introduction to Java Script