Helpful Information
 
 
Category: Beginner Programming
Firepages Bundle Help

First of all thanks for firepage bundle and help I got through this forum.

I have downloaded firepages bundle on 2k system and installed it. Apache, PHP, MySql are working without giving any problem so far.
I need to know how to connect to database from PHP code. Generally I use this code for same.

$hostname = "localhost";
$username = "xyz";
$password = "tmk700tr68";
$dbName = "pqr";

MYSQL_CONNECT($hostname, $username, $password) OR DIE("Unable to connect to database");

@mysql_select_db("$dbName") or die("Unable to select database");
$userstable = "jklm;


I have not given any password and username while creating database in Mysql, in fact it never promted me for same.

Help aprreciated.

Username should be: root
No password. http://www.devshed.com/Talk/Forums/smile.gif Hope that helps.

------------------
Hartmann

$db = mysql_connect("localhost","virtual");
mysql_select_db("pqr",$db);

or try substituting 'root' for 'virtual' - one of them should work.

------------------
Simon Wheeler
FirePages -DHTML/PHP/MySQL

Thanks, it's working. Great Help.










privacy (GDPR)