# PHP connect problem

**URL:** <https://forum.kirupa.com/t/php-connect-problem/214831>\
**Category:** programming\
**Created:** [February 1, 2007, 11:19am UTC](https://forum.kirupa.com/t/php-connect-problem/214831 "2007-02-01T11:19:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pucca](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pucca](https://forum.kirupa.com/u/pucca)\
**Post date:** [February 1, 2007, 11:19am UTC](https://forum.kirupa.com/t/php-connect-problem/214831/1 "2007-02-01T11:19:56Z")

</div>

I will appreciate it EXtreamly if someone can help me asap, please. Created a database, ashtonnews, with table tblsubscribe. On my page where the database should list the entries, it doesn’t show. Give’s me a msg :

**Warning** : mysql\_connect(): Access denied for user: ‘news@localhost’ (Using password: YES) in **c:\inetpub\wwwroot\ashton\db\_connect.php** on line \*\*3

\*\*Here’s my db\_connect.php

```php
//open connection
$conn = mysql_connect("localhost", "news", "news");

//Pick the database to use
mysql_select_db("ashtonnews", $conn);

```

I HAVE granted uname etc and flush priviliges…

Here’s my script for that page, calling entries from db and (suppose to) display them :

```php
include('../db_connect.php');
$sql = "Select * from tblsubscribe";
//Create recordset called $rssub
$rssub = mysql_query($sql,$conn);
//Find out how many records in the recordset
$rows = mysql_fetch_assoc($rssub);

```

```php
  do { 
      <tr>
        <td align="left"><?php echo $rows['sid']; ?></td>
        <td align="left"><?php echo $rows['sname']; ?></td>
        <td align="left"><?php echo $rows['semail']; ?></td>
        <td align="left"><?php echo $rows['sdate']; ?></td>
      </tr>
         } while ($rows = mysql_fetch_assoc($rssub)) ;

```

this is EXACTLY what I’ve always done (I’ve actually copied and pasted everything…

PLEAAAASE help me! I just don’t know what to do??!
