If you mean after the page has been sent to the browser, then no, you can do
anything with PHP - you would need javascript for that.  However, if you
mean that you want certain items to appear pre-selected, the you can do it
quite simply as follows (I have chosen the simplest example, rather than the
most eloquent):

print "<select name='test_select' multiple>";
for ($i = 0; $i < 10; $i++)
{
        print "<option value='$i'";
        if ($i < 5) print " selected";
        print ">";
}

This will pre-select the first five entries, but I hope you get the gist...

Mikey

> -----Original Message-----
> From: Harpreet [mailto:[EMAIL PROTECTED]
> Sent: 19 August 2003 22:13
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Multiple selection in php
>
>
> I want to select multiple rows in a list box. I know PHP does not support
> that.What other ways can I allow user to select multiple options
> other then
> giving them check boxes for each option.
>
> Help is appreciated.
>
> Thanks
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to