Thanks for replying.
Yes, i was just trying random things, turns out it works if i use the actual host name, server, pass, and databasename but the instructor tells you to make a seprate php file which contains the info as such:
<?php
//Database Constants
define("SERVER", "localhost");
define("USER", "root");
define("PASS", "asdsfsadfsdfsd");
define("NAME", "widget_corp");
?>
and then on the content file link to it like so:
<?php
$connection = mysql_connect("SERVER","USER","PASS");
if(!$connection){
die("Database connection failed: " . mysql_error());
}
//2.Select a database to use
$db_select = mysql_select_db("NAME", $connection);
if(!$db_select){
die("Database selection failed: " . mysql_error());
}
?>
So I guess now my question is why doesn't constants work for me?