Create file db_connect.php
db_connect.php content:
$host=localhost ;Mysql -server hostname
$user=root;// user privileges for mysql
$pass=password ;// User password
$port=3306;// Mysql port,common is 3306
mysql_connect($host,$user,$pass) or die ("could not connect to databases");
?>
And then,in other PHP file just add line
include("db_connect.php");
Tìm kiếm với Google
Friday, February 22, 2008
Connect PHP and MySQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment