Re: Pulldown value not passed to next page

From: Date: Thu, 11 Mar 2004 19:46:48 +0000
Subject: Re: Pulldown value not passed to next page
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-33400@lists.php.net to get a copy of this message
Hi Karen, Depending upon the method used for your form, you should be able to find the value in either $_GET['pagesize'] or $_POST['pagesize']. hth, Doug Karen Resplendo wrote:
What is wrong with this picture? I build a pulldown for selecting page size(number of rows in one page). If page is new, it gives the default (selected) of 15. For some reason, when Previous/Next are clicked, the value passed is still 15 even though the pulldown says something else (5 or 15 or whatever). Down below my pulldown code is the code to call the Next/Previous pages (just the important part)> ****************************************** Pulldown built here ****************************************** //use rcan select page size from a pulldown $myArray = array('5','10','15','20','25','30','35', '40'); $numElements = count($myArray); If(!$pagesize) { $pagesize=15; } echo "<SELECT SIZE=1 NAME='pagesize'>"; /*loop through filling pulldown*/ for($i=0;$i<=$numElements;$i++){ echo "<OPTION VALUE=".$myArray[$i];
    If($myArray[$i]==$pagesize)
    {
     echo " SELECTED>".$myArray[$i]."\n";
    }
    Else
    {
     echo ">".$myArray[$i]."\n";
    }
  }  echo "</SELECT><br><br>";
 ****************************************
link when Next/Previous clicked ***************************************
    else            // not the last page, link to the next page         echo "<a href=\"chemlatestPAGETEST.php3?pwsno=".$pwsno."&pagenum=" . ($pagenum + 1)."&pagesize=".$pagesize.  "\">Next</a>"; 
--------------------------------- Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster.


« previous php.db (#33400) next »