html - drop down select option form and pagination error php -


i have form select option, loops , uses pagination break 5 select options per page.
whenever user selects options on several different pages, options selected on last page before submitting form processed.
research on issue has been suggesting using ajax or javascript. idea, how can go - if possible using php alone.

<form method="post" action="consel.php"> <?php     $sql = "select * games startunix > '$nowtime' order starttime limit $offset, $rowsperpage" ;     $retval = mysql_query($sql);     while($row = mysql_fetch_array($retval, mysql_assoc))     {         echo "<div align='center'><span class='style3'>{$row['home']} vs ".              "{$row['away']} </span></div>".              "<font color='#000000' size='2'>{$row['country']} | {$row['league']} | time:{$row['starttime']} </font> <br> ".              "<select name='gm[$row[gamecode]|$row[starttime]|$row[home]|$row[away]]' >              <option value=''>select option</option>     <option value='1'>yes</option>     <option value='2'> no</option>     <option value='3'>total goals</option>     <option value='4'>total </option>     <option value='5'>goals</option>      </select>".              "<hr>";     }      /******  building pagination links ******/     $range = 3;     if ($currentpage > 1) {     echo " <a href='{$_server['php_self']}?currentpage=1'>first page |</a> ";     $prevpage = $currentpage - 1;     echo " <a href='{$_server['php_self']}?currentpage=$prevpage'>previous page |</a> ";     }     ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {           if (($x > 0) && ($x <= $totalpages)) {                 if ($x == $currentpage) {                      echo " [<b>$x</b>] ";                 } else {                      echo " <a href='{$_server['php_self']}?currentpage=$x'>$x</a> ";           }         }      }       if ($currentpage != $totalpages) {          $nextpage = $currentpage + 1;           echo " <a href='{$_server['php_self']}?currentpage=$nextpage'>next</a> ";          echo " <a href='{$_server['php_self']}?currentpage=$totalpages'>| last</a> ";     }      /****** end build pagination links ******/ ?> <input type="submit" name="play" value="submit" /> </form> 

if not submit, next button selected, expected $_post['gm'] of options selected on first/earlier page(s) lost. options selected on page, submit button selected, processed.
want options selected on pages processed.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -