Hi there!
I have problems getting data out of the db. Here's my code:
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM employees",$db);
$varden = mysql_fetch_array($result,MYSQL_ASSOC)
?>
<?=$varden['first'];?>
<?=$varden['last'];?>
<?=$varden['address'];?>
<?=$varden['position'];?>
<?
mysql_close();
?>
It's telling me:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\inetpub\wwwroot\afab\hello.php on line 27
What have I done wrong?
Best regards,
Martin Johansson
+46 70 300 33 20
Squaremedia HB
[email protected]