Can someone help me figure out why mysql_query not working?
<?php
$dbhost = "localhost";
$dbusername = "USERNAME";
$dbpassword = "PASSWORD";
$dbname = "DB_NAME";
$connection = mysql_connect($dbhost, $dbusername,$dbpassword) or die('Could not connect');
$db_selected = mysql_select_db($dbname, $connection) or die(mysql_error());
echo " connect... \n";
$result = mysql_query("select * from test",$db_selected);
while($row = mysql_fetch_array($result))
{
echo $i++;
echo "Id : " . $row['Id'] . " Name : " .$row['name'] . " Address : " . $row['address'];
echo "<br>";
}
?>
result: connect...