stormprograms
New Member
- Messages
- 5
- Reaction score
- 0
- Points
- 0
Okay so I have been trying to get my config.php to act as my establish for my MYSQL but I can't get the MYSQL Connect to work. When I run my code through codepad.org I get this error:
Now the code for my config.php is:
Still I cant figure out what's wrong
The error code when you try to access it through a url is:
Code:
Fatal error: Call to undefined function mysql_connect() on line 7
Now the code for my config.php is:
Code:
<?php
//Mysql connection
DEFINE ('DB_USER', '***********'); // Insert your database username into the quotes.
DEFINE ('DB_PASSWORD', '*********'); // Insert your database password into the quotes.
DEFINE ('DB_HOST', '******************'); // This will most likely stay the same.
DEFINE ('DB_NAME', '************');// Insert your actual database name in the quotes.
$dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error());
mysql_select_db (**************) OR die('Could not select the database: ' . mysql_error() );
//script basic variables
$timeout = 5;
?>
Still I cant figure out what's wrong
The error code when you try to access it through a url is:
Code:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'mysql11.000webhost.com' (4) in /home/palace/runeleague/storm/config.php on line 7
Could not connect to MySQL: Can't connect to MySQL server on 'mysql11.000webhost.com' (4)