View Single Post
Old 02-18-2012, 08:23 PM   #4
fido123
FFR Player
 
fido123's Avatar
 
Join Date: Sep 2005
Age: 32
Posts: 4,245
Default Re: PHP+MySQL Database Problem

Might be off on the mysql_error(); part. If not just delete everything after 'or' on line 1

Code:
<?php
mysql_connect('localhost', 'USERNAME', 'PASSWORD') or die (echo mysql_error());
mysql_select_db('DATABASE_NAME') or echo "Database does not exist";
?>
If this doesn't work I'm pretty sure the problem is in your database. If you could post the output of the following commands it would be great. To make a lot file just use \t FILENAME to start logging then \T to stop (might be the other way around):

Code:
SHOW DATABASES;
USE (database you're trying to use);
SHOW TABLES;

Last edited by fido123; 02-18-2012 at 08:29 PM..
fido123 is offline   Reply With Quote