|
 |
beginning_php thread: Information is selected using combo box, how to set the 'default' while display
Message #1 by "Vikas Athavale" <vikaspa@b...> on Wed, 18 Sep 2002 09:53:21
|
|
I am accepting zones from a combo box.
Actual value and Zone
1 North
2 South
3 East
4 West
The combo displays the zone names South,No4rth etc and corresponding
values (on eof 1,2,3,4) is stored in file.
When youe want to see the employee detail i wna to set default of the
combo box accordingly.
By default my combo box is set to North.
If the employee code selected is of "South" zone what change i need to
make in combo box ?
Message #2 by "Gerry Vandermaesen" <gerry.v@s...> on Wed, 18 Sep 2002 11:03:47 +0200
|
|
You would use something like
<option value="...">...</option>
For all the elements in the combo.
To specify the default use <option value="..." selected></option
This is easily done in php with something like this
<option value="..."<?php if ($var1==$var2) echo (' selected');
?>></option>
-----Original Message-----
From: Vikas Athavale [mailto:vikaspa@b...]
Sent: woensdag 18 september 2002 9:53
To: beginning php
Subject: [beginning_php] Information is selected using combo box, how to
set the 'default' while display
I am accepting zones from a combo box.
Actual value and Zone
1 North
2 South
3 East
4 West
The combo displays the zone names South,No4rth etc and corresponding
values (on eof 1,2,3,4) is stored in file.
When youe want to see the employee detail i wna to set default of the
combo box accordingly.
By default my combo box is set to North.
If the employee code selected is of "South" zone what change i need to
make in combo box ?
|
 |