Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: SELECT ALL option in drop down listbox |
|
Author |
|
fifimtwana
Joined: 24 Feb 2011 Posts: 22
|
Posted: Mon 28 Mar '11 10:19 Post subject: SELECT ALL option in drop down listbox |
|
|
Hey guys
Can someone please help me with this chllenge im facing...
Here is the thing, I want to be able to have an option "Select All" under the dropdown list.
The select all option must allow a user to select all the names of students (which are already listed in the drop down list) and book all of them at the same time for leave or sick leave or offsite work.
Thanx in advance.. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
fifimtwana
Joined: 24 Feb 2011 Posts: 22
|
Posted: Tue 29 Mar '11 8:29 Post subject: |
|
|
Thank you James Bond, you've been very helpfull |
|
Back to top |
|
fifimtwana
Joined: 24 Feb 2011 Posts: 22
|
Posted: Tue 29 Mar '11 10:46 Post subject: |
|
|
I've looked at the link, bot still cant figure out what to do..... I'n a newbie in php so please bare with me....
ive used the code below to get the names to appear in the dropdown list
$STATUS = "ACTIVE";
$query4 = "select ID,Name,Surname from students where Status='$STATUS' and LEARNERSHIP='$LSHIP' and LEVEL='$LVL' and YEARGROUP ='$GRP' order by Surname";
$result4=mysql_query($query4);
$num=mysql_numrows($result4);
<TABLE>
<FORM NAME ="ATT_REG" METHOD ="Get" ACTION = "">
<TR>
<TD> <font size="2" face="bmwtyperegular">
Select Student to Book:
</TD>
<TD>
<select name="ID">
<?PHP
while($nt=mysql_fetch_array($result4))
echo "<option value=$nt[ID]>$nt[Name] $nt[Surname]</option>";
echo "</select>";
?>[/b] |
|
Back to top |
|
|
|
|
|
|