Hi everyone. To connect MySQL database with PHP is so easily, look at here!

1
2
3
4
5
6
7
8
9
10
11
< ?php
 
$hostname = "localhost";
$username = "oralpc_user";
$password = "oralpc_password";
$database = "oralpc_database";
 
mysql_connect($hostname, $username, $password) or die("Cannot connect to MySQL server");
mysql_select_db($database) or die("Cannot select database");
 
?>

As you see above, there are 4 variabels. First variabel $hostname is refer to the database hostname, $username, $password variabels are refer to username and password of the database, and then the $database variabel is include about the database name.

Read more »


About this blog

This blog is made by Muhammad Baiquni, dedicated to give all of you information about Computer, Security, Ebook reviews, Software, Tutorial, Web: HTML, PHP, MySQL, CSS, and more of million information.

If you like, please bookmark this web or feed us for be the first one get our newest information.

Photostream

    bari - giubin.comNerd EquipmentHard disk - WD 10000 - giubin.com - Barlettamacwindows 7 & Mac OS X ssh ♥

Categories

    make money with your web site