Hi i would like to know why my code isn’t storing information into the stated variables after ive clicked the next record button
This is the defined variables’s :
[php]
<?php $sql=mysql_query("SELECT *FROM clients WHERE id > 0 ORDER BY id ASC LIMIT 1"); $row=mysql_fetch_array($sql); $id=$row['id']; $FirstName=$row['FirstName']; $Surname=$row['Surname']; $DOB=$row['DOB']; $Nationality=$row['Nationality']; ?>[/php]
And when i press the “Next record” button, the data inside the variables should change to the “current” data but it doesn’t.
[php]
<?php if($_REQUEST['chngRecord'] == 'Next Record') { $sql=mysql_query("SELECT *FROM clients WHERE id > {$id} LIMIT 1"); $row=mysql_fetch_array($sql); $id=$row['id']; $FirstName=$row['FirstName']; $Surname=$row['Surname']; $DOB=$row['DOB']; $Nationality=$row['Nationality']; echo $id; } [/php]