|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Username should be: root
No password. Hope that helps.------------------ Hartmann |
|
#3
|
||||
|
||||
|
$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 |
|
#4
|
|||
|
|||
|
Thanks, it's working. Great Help.
|
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Firepages Bundle Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|