Jump to content

Mysql connection problem


HaZaRd420

Recommended Posts

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 9
Access 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"].' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b>Author:</b><i> '.$row["author"].' </i> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.