0

for experiment i pull data from mysql to xml to use in flash how can i add ahref to id in xml to achieve like this
http://www.kalitekolik.x10.mx/product.php?id=1
http://www.kalitekolik.x10.mx/PHP_MySQL_Flash_FINISHED.swf


my database like this
id/ product_name/ price/ details

<?PHP
$link = mysql_connect("localhost","lafamosa_kermis","lafamosa1000");
mysql_select_db("lafamosa");
$query = 'SELECT * FROM products';
$results = mysql_query($query);
echo "<?xml version=\"1.0\"?>\n";
echo "<products>\n";
while($line = mysql_fetch_assoc($results)) {
	echo "<item>" . $line["id"] . "</item>\n";
	echo "<item>" . $line["product_name"] . "</item>\n";
	echo "<item>" . $line["price"] . "</item>\n";
}
echo "</products>\n";
mysql_close($link);

?>
2
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by shahbaz13
0
echo "<item>" . $line["id"] . "</item>\n";
	echo "<item>" . $line["product_name"] . "</item>\n";
	echo "<item>" . $line["price"] . "</item>\n";
	echo "<link>http://www.yoursite.com</link>\n";

Use this...

0

my aim is to add link to id or product_name to go its own page like
product.php?id=1

0

also you can try putting it in CDATA[ ] tags to preserve the un-encoded format but i never had much luck with CDATA and Flash

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.