02-18-2012, 08:23 PM
|
#4
|
FFR Player
Join Date: Sep 2005
Age: 32
Posts: 4,245
|
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..
|
|
|