Okay so I'm trying to make a online store using php mysql and flash but I can't seem to get tit to work.
Code:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /backup/home/mitchell/public_html/products.php on line 12
This is the code in its entirty
PHP Code:
<?php
$link = mysql_connect("localhost","*****_*****","*****");
mysql_select_db("mitchell_test");
$query = 'SELECT * FROM products';
$results = mysql_query($query);
echo "<?xml version=\"2.0\"?>\n";
echo "<products>\n";
while($line = mysql_fetch_assoc($results)) {
echo "<item>" . $line["product"] . "</item>\n";
}
echo "</products>\n";
mysql_close($link);
?>
Asterixs are the username and password for the database.
Basically what the code should do is display the names of all the rows in the table. But All I get is the error.
this is just the begining steps to my project from here the php will create some xml which the flash file will read.