Jump to content

No database selected


elis

Recommended Posts

I'm not sure what the problems, but I switched hosts recently, but I kept the exact same coding to my site - but for some reason  I'm now receiving "No database selected" as an error.

[code]<?php $dbhost = 'localhost';
$dbuser = 'myusername';
$dbpass = 'mypassword';
$dbname = 'mydatabasename';
$mysql_access = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname, $mysql_access);?>[/code]

Does anyone see why I'm getting this error?
Link to comment
https://forums.phpfreaks.com/topic/25879-no-database-selected/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.