I am receiving the following error on mysql_connect with a blank password


Notice: Use of undefined constant localhost - assumed 'localhost' in C:\wamp\www\forum\functions.php on line 14

Notice: Use of undefined constant root - assumed 'root' in C:\wamp\www\forum\functions.php on line 14

Notice: Use of undefined constant users - assumed 'users' in C:\wamp\www\forum\functions.php on line 15
function connect(){
		$con =  mysql_connect(localhost, root, '') or die(mysql_error());
		$db  =  mysql_select_db(users,$con);
	}
    function connect()
    {
    	$con = mysql_connect('localhost', 'root', '') or exit(mysql_error());
    	$db = mysql_select_db('users', $con) or exit(mysql_error());
    }
    
      Write a Reply...