HostFX-UK
02-02-2009, 12:55 PM
Can anyone see anything wrong with this code, I have checked everything in the database and there is nothing wrong with that, all the tables exist etc.
The error I am getting is:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/whmaster/public_html/clientarea/activetickets.php on line 136
The code is:
<?php
$dblink = mysql_connect($sqlhost,$sqlusr,$sqlpw);
mysql_select_db($sqldb,$dblink);
$usrnmes = $_SESSION['username'];
$query = "SELECT * FROM support WHERE username='$usrnmes'";
while($result = mysql_fetch_array($query)) {
?>
<table width="100%" border="0">
<tr>
<td><strong><?php echo $result['subject']; ?></strong></td>
<td><strong><?php echo $result['status']; ?></strong></td>
<td><strong>Date</strong></td>
</tr>
</table>
<?php
}
?>
The error I am getting is:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/whmaster/public_html/clientarea/activetickets.php on line 136
The code is:
<?php
$dblink = mysql_connect($sqlhost,$sqlusr,$sqlpw);
mysql_select_db($sqldb,$dblink);
$usrnmes = $_SESSION['username'];
$query = "SELECT * FROM support WHERE username='$usrnmes'";
while($result = mysql_fetch_array($query)) {
?>
<table width="100%" border="0">
<tr>
<td><strong><?php echo $result['subject']; ?></strong></td>
<td><strong><?php echo $result['status']; ?></strong></td>
<td><strong>Date</strong></td>
</tr>
</table>
<?php
}
?>
