Posted by Ivαn Sαnchez Ortega on 06/05/07 21:23
Mark Winter wrote:
> <SELECT MULTIPLE name="CATEGORIES" size="10" id="CATEGORIES"
[...]
> $categories=htmlspecialchars($_POST['CATEGORIES']);
You need to turn that into an array. Keep in mind that a <select multiple>
returns several GET or POST variables with the same name. So, you'll have
to use the magic of the [] operator here:
<select multiple='multiple' name='categories[]' ... >
And then, something like:
foreach($_POST['categories'] as $cat)
{
echo $cat;
}
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
You will be awarded a medal for disregarding safety in saving someone.
[Back to original message]
|