Categories
PHP Tutorials

Upload files using PHP explained

Upload files using PHP explained here in this example.

Categories
PHP Tutorials

PHP Code Example – How to connect MySQL database

The steps to connect MySQL database with PHP.  This program will work for database connection in PHP with MySQL in XAMPP or using WAMP server. A simplest example where a script of PHP connect to MySQL database and also this is an example of PHP program on database connection.

Categories
PHP Tutorials

Static Variables in PHP with simple example

Static in PHP:

Retains the local variable value and it donot loose its value at the end of function call.

<?php
function f()
{
static $x=1;
echo $x.”<br />”;
$x++;
}
f();
f();
?>

Output  of this program:

1
2