Connect PHP to MySQL Database

74 views
asked Apr 1, 2012 in Database by roller1 (500 points)
Hello every1..

how do i initially connect MySQL database to PHP?

Thank you

1 Answer

0 like 0 dislike
answered Apr 1, 2012 by moon_tag (1,380 points)
hi roller

to Create a Connection from PHP to a MySQL Database use mysql_connect() function
the syntax is
mysql_connect(servername,username,password);

for further details you can check  http://www.w3schools.com/php/php_mysql_connect.asp
...