Hey guys, In this thread I give you the code on how to easily connect to a database and I explain what everything does in the video below.
Don't feel like you have to watch the video if you know what you're doing.
If you would like to know what everything does (explanation of code) check the video.
$dbhost = "localhost";
$dbname = "projectdb";
$dbuser = "root";
$dbpass = "";
//connect to client.
mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
mysql_select_db($dbname) or die(mysql_error());
Hope you guys have a good day