HaZaRd420 Posted March 3, 2006 Share Posted March 3, 2006 Hello, im having this problem with my mysql not connecting to my DB:Warning: mysql_connect(): Access denied for user: 'MYDB@localhost' (Using password: YES) in /home/gtqsqua/public_html/roster/members.php on line 9Access denied for user: MYDB@localhost' (Using password: YES)And heres the members.php[code]<?php//PHP NEWS v0.1 BY HaZaRd//include('config.php');$connection = mysql_connect( "$host","$user","$pass" ) or die(mysql_error());$rs = mysql_select_db( "$db" );$sql=" select * from news order by date $sort ";$rs = mysql_query($sql) or die(mysql_error());echo '';while ( $row = mysql_fetch_array( $rs) ){echo '<font face="verdana" size=1><b>Subject:</b> '.$row["subject"].' <b>Author:</b><i> '.$row["author"].' </i> <b>Date:</b> '.$row["date"].'<br><br>'.$row["content"].'<br><hr color="#000000">';}?>[/code]Please Help me on this, I cant figure out what the problem is. Quote Link to comment Share on other sites More sharing options...
helpmeplease2 Posted March 4, 2006 Share Posted March 4, 2006 please include config.php in your post Quote Link to comment Share on other sites More sharing options...
earl_dc10 Posted March 4, 2006 Share Posted March 4, 2006 also, please try this:change[code]$connection = mysql_connect( "$host","$user","$pass" ) or die(mysql_error());[/code]to[code]$connection = mysql_connect( $host, $user, $pass ) or die(mysql_error());[/code] Quote Link to comment Share on other sites More sharing options...
HaZaRd420 Posted March 5, 2006 Author Share Posted March 5, 2006 Nevermind, I fixed the problem :)!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.