PHP with Xitami connect to MySQL????

wxdqz

New Member
Hello Everyone,

I install PHP, Xitami Webserver, and MySQL on Windows 98. Everything is working fine independently. PHP runs on Xitami no problem. However, I have problem with the connection using PHP connect to MySQL database. Please help!!!

Here is what I understand and what I don't understand:

I know that you need this to do the connection,

$connection = mysql_connect("hostname", "root");

$mysql_select_db("database_name", $connection);

What I don't understand is the "hostname" and "root". How can I find out what "hostname" and "root" are?

And here is what I have:

I install MySQL in the root directory and of course the database and the table I created are under MySQL table. "MyDatabase" is my database name.

C:\MySQL\Data\MyDatabase\

I have PHP and Xitami on C:\PHP and C:\Xitami, respectively.

Please help me to connect this two suckers together... thank you for your help.

Chris
 
Back
Top