Menu
hi all,
I am working on a website and kind of stuck cos my database functions are not working.
connection to the server is not working.
also when hosting the website the connection is on the server so how do code the correct server(localhost)
Any help ? Pleeeeaaase.Thanks
/**
* connects to database server and selects database
*/
function db_connect()
{
$connection = new mysqli(”,’username’,’password’);
if(!$connection)
{
return false;
}
if(!mysql_select_db(‘database’))
{
return false;
}
return $connection;
}