Re: parsing select multiple="multiple"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




         <select multiple="multiple" name="DPRtype" form="DPRform">
             <option value="1. Crimes Against Persons">1. Crimes Against
Persons</option>
             <option value="2. Disturbances">2. Disturbances</option>
             <option value="3. Assistance / Medical">3. Assistance /
Medical</option>
             <option value="4. Crimes Against Property">4. Crimes Against
Property</option>
             <option value="5. Accidents / Traffic Problems">5. Accidents /
Traffic Problems</option>
             <option value="6. Suspicious Circumstances">6. Suspicious
Circumstances</option>
             <option value="7. Morality / Drugs">7. Morality /
Drugs</option>
             <option value="8. Miscellaneous Service">8. Miscellaneous
Service</option>
             <option value="9. Alarms">9. Alarms</option>
           </select>



Do test this, but I think all that's required is you make the name an array:

<select name="DPRpriority[]" form="DPRform">
Something like this?

if $DPRpriority[0] == "7. Morality / Drugs" { echo "selected"; }

I hate arrays. :D

http://php.net/manual/en/language.types.array.php

<?php
$DPRpriority[]  = array(
   1    => "a",
   "1"  => "b",
   1.5  => "c",
   true => "d",
);
var_dump($array);
?>


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux