Jump to content

No database selected error.


mikes1471

Recommended Posts

HI

 

Being fairly new to PHP I have a connection script with instructions as follows:

 

$dbserver="localhost";  // do not change this

$dbuser="USERNAME";    // Replace USERNAME with your database username

$dbpass="PASSWORD";    // Replace with your database password which will ALSO be your password to log into your Site Admin Area

$dbname="USERNAME_date";      // your database name. Replace USERNAME with your database username and keep the underscore there

 

Its the line highlighted in bold which is giving me issues as when I view my index page and the links related to it, it indicates there is no database selected

 

My index url is http://www.picfrisky.com

Link to comment
https://forums.phpfreaks.com/topic/44763-no-database-selected-error/
Share on other sites

HI

 

Being fairly new to PHP I have a connection script with instructions as follows:

 

$dbserver="localhost";  // do not change this

$dbuser="USERNAME";    // Replace USERNAME with your database username

$dbpass="PASSWORD";    // Replace with your database password which will ALSO be your password to log into your Site Admin Area

$dbname="USERNAME_date";      // your database name. Replace USERNAME with your database username and keep the underscore there

 

Its the line highlighted in bold which is giving me issues as when I view my index page and the links related to it, it indicates there is no database selected

 

My index url is http://www.picfrisky.com

 

$dbname="databasename"; // Always! accept if you have something like shared hosting then it will be username_dbname

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.