"No Database Selected" from video 5 Source

Videos around the RTS tutorial series
Post Reply
supermooo
Posts: 2
Joined: Thu Sep 29, 2011 5:39 am

"No Database Selected" from video 5 Source

Post by supermooo »

When I launch my index page it says "No database selected." in the top left corner in plain black and white. I understand it is coming from the connect.php source. When I change this to fit my mySQL information the problem persists. The only advancement I can get is if I remove this from the bottom of connect.php:

Code: Select all

if(!mysql_select_db("rts",$db))
 	die("No database selected."); 
However this just brings up "Sorry, not logged in please Login". I traced this back to the index.php source to no avail. I also noticed your using the mysql statements and not mysqli, changing these for me made no difference though.

Please help me out, and btw thanks for the videos!
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: "No Database Selected" from video 5 Source

Post by hallsofvallhalla »

it is basically saying it cant find your DB, are you using WAMP?
supermooo
Posts: 2
Joined: Thu Sep 29, 2011 5:39 am

Re: "No Database Selected" from video 5 Source

Post by supermooo »

Using XAMPP and check server is up and can see database from the phpmyadmin console. I used your sql file as an import too.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: "No Database Selected" from video 5 Source

Post by hallsofvallhalla »

is your DB called rts? all lower case?
Post Reply

Return to “Browser based RTS Videos”