okay,
going crazy here - i wanted to display each row of a array (from results of Mysql query) one at a time. i had them in while loop and all rows showed at once. i was then advised to ditch the while loop and use sessions.
i have spent hours trying to get this to work - using comments on this site and PHP tutorials, but am very confused and need help.
scenario:
eg. Mysql query: select col1, col2, col3, col4 from MyTable. (MyTable has about 10 rows)
display
col1 (row1)
col2 (row1)
col3 (row1)
col4 (row1)
refresh browser (or pref - click Submit button)
display
col1 (row2)
col2 (row2)
col3 (row2)
col4 (row2)
refresh/submit .... etc etc until all rows have been displayed.
i believe i have to use $_SESSION
variables - i tried - in each refresh - to set the variables like this
$_SESSION['column1']= $rownum;
$_SESSION['column2']= $rownum;
$_SESSION['column3']= $rownum;
$_SESSION['column4']= $rownum;
but i don't get the columns displaying correctly.
please help me resolve this - and if possible with code example - including the session start and refresh or whatever it may need.
Many Thanks in advance