Unit 10: Working with Files

What is a File? A file is simply a resource for storing information on a computer. Files are usually used to store information such as; Configuration settings of a program Simple data such as contact names against the phone numbers. Images, Pictures, Photos, etc. Opening a File The fopen() function is used to open files […]

Continue Reading

Unit 6: Making Web Forms

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. Example  The example below contains an HTML form with two input fields and a submit button:

When a user fills out […]

Continue Reading

Unit 4: Working with Arrays

Array An array stores multiple values in one single variable.A variable is a storage area holding a number or text. The problem is, a variable will hold only one value.An array is a special variable, which can store multiple values in one single variable.An array can hold all your variable values under a single name. […]

Continue Reading

Unit 5: Functions

  PHP Functions To keep the browser from executing a script when the page loads, you can put your script into a function.A function will be executed by a call to the function. You may call a function from anywhere within a page. Create a PHP Function A function will be executed by a call […]

Continue Reading

Unit 3: Making Decisions and Repeating Yourself

  Conditional Statements Conditional statements are used to perform different actions based on different conditions. In PHP we have the following conditional statements: if statement – use this statement to execute some code only if a specified condition is true if..else statement – use this statement to execute some code if a condition is true […]

Continue Reading