here is a snippet of code, the error is in the mysql_fetch_array() function. I can connect to my databse fine, but cant retrieve data.
Code: Select all
<?php
//connecting to mySQL database
$dbhost = 'localhost';
$dbuser = 'XXXX';
$dbpass = 'XXXX';
$dbname = 'XXXX';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
//
//get form variables and use them for querry
$query = "SELECT * FROM XUSERS";
$result = mysql_query($query);
//
while ($row = mysql_fetch_array($result))
{
echo $row['id'];
}
?>please help, Im going crazzy.