Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14625 reviews 1734 hosting providers

Questions & Answers

Connect PHP to MySQL Database

Apr 1, 2012 by roller1
Hello every1..

how do i initially connect MySQL database to PHP?

Thank you

1 Answer

0 votes
Apr 1, 2012 by moon_tag
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