had a search around for this particular problem but had no joy, any help would be great.
I'm trying to send some data from MySQL server into flash via PHP.
Problem is the using a variable instead of the exact string in a while loop I think...
==================================================================
here is my code:
<?php
$leilField = $_POST['dataBaseTarget'];
$year = $_POST['yearTarget'];
$connect = mysql_connect("********", "********", "********");
mysql_select_db("********", $connect);
$result = mysql_query("SELECT ID, $leilField FROM booking_dates_2008");
$count=0;
while($row=mysql_fetch_array($result)){
echo "id$count=$row[ID]&date$count=$row[$leilField]&";
$count++;
}
echo "count=$count";
?>
================================================
Any ideas what I'm doing wrong here?
cheers
looping through fields using variables (newbie problem)
Moderator: General Moderators
- Peter Anselmo
- Forum Commoner
- Posts: 58
- Joined: Wed Feb 27, 2008 7:22 pm
Re: looping through fields using variables (newbie problem)
What is happening when you run the code? Is there an error message?