Hi,
I'm loading into flash, using php, variables that were previously stored on a mysql database. Everything is running OK except for the number of the present entry when someone browses through all entries. It always shows the total entries number and not the number of the entry that is being showed.
Just to explain better with this image the number on the right show the total entries. When we click the left arrow button the number on the left should be 5,4,and so on... The problem is it stays in the same number, the number 6.
The php script is this one:
<?
$DBConn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Erro no Livro de Visitas: " . mysql_error());
mysql_select_db($DBName, $DBConn) or die("Erro no Livro de Visitas: " . mysql_error());
$result = mysql_query("SELECT * FROM tblGuestBook order by fldUID DESC");
$allComments = $result;
$numallComments = mysql_num_rows($allComments);
$num = 0;
while($row = mysql_fetch_row($result))
{ print "&ID$num={$row[0]}&arr_Name$num={$row[1]}&arr_City$num={$row[2]}&{$row[3]}&arr_Email$num={$row[4]}&arr_URL$num={$row[5]}&arr_Comment$num={$row[6]}&arr_Continent$num={$row[8]}&arr_fldX$num={$row[9]}&arr_fldY$num={$row[10]}&arr_fldScrollX$num={$row[11]}&arr_fldScrollY$num={$row[12]}&arr_Civ$num={$row[13]}&arr_Date$num={$row[7]}";
$num++;
}
print '&int_Records=' . $numallComments -1 . '&';
print '&present_Record=' . $numallComments . '&';
print '&total_Records=' . $numallComments . '&';
?>
I´m sure the problem is not on the flash side so it must be on the php script. Can someone help me please?
Tank you very much,
Filipename