I still cant get it right, in query.php i have this piece of code;
echo "<form action='test2.php' action='post'> <select name='language'> <option value='0'selected='yes'>one</option> <option value='1'>two</option> </select> <input type=text name=query> <input type=submit name=submit> </form>"; and in test2.php i have this; if ($_POST['language'] = 1) {$lang = "EngP=1";} else {$lang = "EngP=0";} echo $lang ; But it always echoes EngP=1 no matter what I choose, what is wrong here?? "Erik Price" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > On Wednesday, June 26, 2002, at 02:51 PM, Haddad Said wrote: > > > Hi, i am having a problem passing variables from a drop down menu in a > > form; > > > > <from action=test.php action=post> > > <select name=example> > > <option selected> one</option> > > <option> two</option> > > </form> > > You should do it like this (be sure to properly quote your attributes, > and use the 'value' attribute of the 'option' tag): > > print "<form action='test.php' method='post'> > <select name='example'> > <option selected='yes' value='1'>One</option> > <option value='2'>Two</option> > </select> > </form>\n"; > > In the "test.php" page, the selected value will be found in the > $_POST['example'] variable. > > > Erik > > > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php