Connect To MySQL
Join the DZone community and get the full member experience.Join For Free
// Connect to MySQL Database
//connect to your database ** EDIT REQUIRED HERE ** mysql_connect("localhost","username","password"); //(host, username, password) //specify database ** EDIT REQUIRED HERE ** mysql_select_db("database") or die("Unable to select database"); //select which database we're using
Opinions expressed by DZone contributors are their own.