admin's Archive

PHP Cookies

This item was filled under [ PHP & MySql, References ]

Cookies are just like sessions used for storing data that needs to be remembered and accessed from different files. However, unlike sessions, cookies are saved on the user’s browser ( client-sided ). They can be stored in there for any period unlike sessions ( which are saved for a constant ‘session period’ ). However, they [...]

Continue reading...

Tagged with: [ , , ]

PHP Sessions

This item was filled under [ PHP & MySql, References ]

Sessions are special kind of variables which are used to store data into that needs to be ‘remembered’ and needs to be accessed from different files. For example: you need to store the username of the logged in user on your website. Once the username is stored into a variable, you do not want the [...]

Continue reading...

Tagged with: [ , ]

PHP Arrays

This item was filled under [ PHP & MySql, References ]

An array is a special kind of ‘variable’. It consists of a group of sub-variables. Each sub-variable has, like any variable, a name ( which is called the key for a sub-variable of an array ) and a value. There is two ways to define an array. Manner 1 $my_array = array( “sub_var_1” => “value_1”, [...]

Continue reading...

Tagged with: [ , , ]

PHP Functions

This item was filled under [ PHP & MySql, References ]

Functions are used for processes that need to be executed various times. They make it easier, faster and more efficient to get a certain process done. To create your own function, the following structure is used: function funcName ( … arguments … ) { … function process code … } You can give the function [...]

Continue reading...

Tagged with: [ , , ]

PHP While – Do While Loop

This item was filled under [ PHP & MySql, References ]

The While Loop is used to repeat executing a certain code as long as a given condition is (still) true. while( … condition … ) { … execute code … } The code between accolades is only executed when the condition between brackets is true ( just like the If Loop) however after it executed [...]

Continue reading...

Tagged with: [ , , , ]