|
|
Question : Connect to mysql with php
|
|
Hello and help!
I am trying to set up a connection from php to my sql. I am using xp pro and have mysql and php set up properly I can make a database with mysql monitor and my php scripts work fine. I am using xp's IIS server.
However It says in my bok that I need the following information to connect php and mysql mysql_connect (address, username, password) below is the book example.
// Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'mypasswd');
How do I find out my address username and password I do not have a password set up on mysql command prompt I just press enter and go straight to mysql>
Please help
|
Answer : Connect to mysql with php
|
|
the mysql-extension is not installed for php, that what > Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwroot\jokelist.php on line 11 indicates. You woudn't see that error if there is a @ infront of mysql_connect. To fix the error see:
http://www.php.net/manual/en/ref.mysql.php#id5609105
|
|
|
|
|