mikes1471 Posted March 29, 2007 Share Posted March 29, 2007 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 More sharing options...
DeathStar Posted March 29, 2007 Share Posted March 29, 2007 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 Link to comment https://forums.phpfreaks.com/topic/44763-no-database-selected-error/#findComment-217346 Share on other sites More sharing options...
AndyB Posted March 29, 2007 Share Posted March 29, 2007 assuming that you have the correct value for $dbname, we'd need to see more code ... especially the connection and database selection lines. Link to comment https://forums.phpfreaks.com/topic/44763-no-database-selected-error/#findComment-217356 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.