Sheepoholics
New Member
- Messages
- 266
- Reaction score
- 0
- Points
- 0
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.
This is the code in its entirty
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.
Code:
[B]Warning[/B]: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/backup/home/mitchell/public_html/products.php[/B] on line [B]12[/B]
PHP:
<?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);
?>
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.
Last edited: