Hello, I have a problem with this script when i will check it in the browser, the output is :
"Warning: mysql_query() expects parameter 1 to be string, resource given in C:\xampp\htdocs\doto\php\new_case.php on line 8
FOUT
SELECT * FROM disp_type ORDER BY t_naam ASC
Resource id #3"
<?php
$host="localhost";
$username="TEST";
$password ="";
$dbnaam="DOTO";
$db=mysql_connect($host, $username, $password) or die (mysql_error());
mysql_select_db($dbnaam, $db) or die (mysql_error());
$query_test = "SELECT * FROM disp_type ORDER BY t_naam ASC";
if(!$result = mysql_query($db,$query_test))
{
echo('FOUT<br>');
echo($query_test . '<br>');
echo($db);
exit;
}
while($record = mysql_fetch_array($result))
{
echo "ID : {$record['t_id']}<br>Naam: {$record['t_naam']}<br>";
}
?>
As you can see, echo($db) = Recource ID #3 ??
Can you please help me?