Re: $POST Q

From: Date: Tue, 12 Dec 2006 11:03:03 +0000
Subject: Re: $POST Q
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-245735@lists.php.net to get a copy of this message
William Stokes wrote: > Hello, > > Can someone tell me what wrong or to how to manage this? > > //default > $limitorig = 10; > > echo "<select name=\"USRlimitorig\">"; > echo "<option selected value=>$limitorig</option>"; ^^ what do you think $_POST['USRlimitorig'] will be if you select the first option? > echo "<option>10</option>"; > echo "<option>20</option>"; > echo "<option>30</option>"; > echo <input type=\"submit\" name=\"resetlimit\" > value=\"GO\">"; > > When the form is first printed the selected default (10) value is shown OK > and if something is selected everything is fine. If I just hit "GO" without > changing the select menu the form fails because USRlimitorig will be empty. > So how to post the $limitorig if user doesn't change it but hits "GO" > anyway? > > Thanks > -Will >

« previous php.general (#245735) next »