RE: [PHP-DB] PHP problem

From: Date: Mon, 30 Apr 2001 08:43:00 +0000
Subject: RE: [PHP-DB] PHP problem
Groups: php.db 
Request: Send a blank email to php-db+get-8983@lists.php.net to get a copy of this message
user something like this: the thing you're looking for is the SELECTED bit of the select drop down ... echo '<select name="month" onChange="document.thisForm.submit()">'; $months = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); for ($x=1; $x <= count($months); $x++) { print "\t<option value=\"$x\" "; print ($x == intval($cmonth)) ? " SELECTED":" "; print ">".$months[$x-1]."\n</option>"; } echo ' </select> '; get the form to submit itself using action=<?php print $PHP_SELF() ?> Steve > -----Original Message----- > From: Johan [mailto:heegs800@man.nhl.nl] > Sent: 29 April 2001 16:02 > To: php-db@lists.php.net > Subject: [PHP-DB] PHP problem > > > Dear Sir/Madam, > > I have a mysql database available with user information. I want that > visitors have the change to change their personel > information. Now the form > works with two different types of fields. edit-fields and > selectie/option-lists. > > How do I get the value of a user from a selectionlists selected in the > form-field. All options must be availabele, but the value of > the user must > be selected in the form field. > > If anyone can help me please mail me at heegs800@man.nhl.nl > > Thanks > > Johan. > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.db (#8983) next »