Basically I am trying to run some code to insert some data into my database. I have a seperate file to connect to the data base:
Then in a file called register.php I include the config.php and that page then loads perfectly fine. you hit register and tries to insert the data into the database I get this error message:
Access denied for user '*****'@'localhost' (using password: NO)
Now I have double checked my user and password information for the database and it is correct so HELP!
Code:
<?php
$link = mysql_connect('localhost', '*****', '*****');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db('******', $link);
if (!$db_selected) {
die ('Can\'t use database : ' . mysql_error());
?>
Then in a file called register.php I include the config.php and that page then loads perfectly fine. you hit register and tries to insert the data into the database I get this error message:
Access denied for user '*****'@'localhost' (using password: NO)
Now I have double checked my user and password information for the database and it is correct so HELP!