MySQL Error

Status
Not open for further replies.

dreamc90

New Member
Messages
7
Reaction score
0
Points
0
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dreamc90_dccREAD'@'localhost' (using password: YES) in/home/dreamc90/public_html/index.php on line 16
Access denied for user 'dreamc90_dccREAD'@'localhost' (using password: YES)

This user has full privileges for testing purposes. database is setup correctly and I'm on the x10.bz domain. Can't seem to figure out the issue here. All variables are host='localhost', user='dreamc90_ReaD', pass='Xxx

PHP:
session_start();
if (!isset($_POST['username']))
{      
$_SESSION['user'] = 'Welcome, Guest';
}
else
{     
        // Connects to your Database 
      $host = "localhost";
      $user = "dreamc90_dccReaD";
      $pass = "Xxx";
      $db = "dreamc90_dccDB";
      mysql_connect($host, $user, $pass) or die(mysql_error());  
      mysql_select_db($db) or die(mysql_error());
      $data = mysql_query("SELECT username,password FROM User WHERE username={$_POST['username']}") or die(mysql_error());
      $info = mysql_fetch_array( $data ); 
     while($info = mysql_fetch_array( $data )) 
      {
              if ($info['username'] == $_POST['username'])
              {
                     $_SESSION['user'] = 'Welcome, ' + strtoupper($row['USERFIRSTNAME']); 
              }
              else
              { 
                     $_SESSION['user'] = 'Incorrect Username/Password!';
              } 
     }
}


Please all help is appreciated.

Do to error, passwords have changed.
 
Last edited:

dreamc90

New Member
Messages
7
Reaction score
0
Points
0
I seem to have fixed the issue. Anybody know if have a form direct to itself via submit will keep post data, doesn't seem to work for me. Trying to have a user login an set session variable and show it on screen.

dreamcarclub.x10.bz
 
Status
Not open for further replies.
Top