I have a Select tag on my php form named my_form.php:
PHP Code:
<FORM NAME="my_form" ACTION="my_dispatcher.php" METHOD="post"> <SELECT NAME="frm_available_depts_cbo[]" MULTIPLE='multiple' SIZE="8">
my_form.php calls my_dispatcher.php and I'm trying to access the items in the list like this:
PHP Code:
foreach ($frm_available_depts_cbo as $dept_id) { print "$dept_id<br>"; }
But I'm getting: Warning: Invalid argument supplied for foreach()
I'm submitting my_form.php using javascript's .Submit() in a JS function:
PHP Code:
// JS code function submit_my_form_click() { // do other stuff here before submitting ... document.my_form.submit(); }
<INPUT NAME="btn_click" TYPE="button" VALUE="Update" onClick="submit_myform_click();">
So, I can't figure out why I'm getting that warning!
__________________
RalphF
Business Text Messaging Services
Please login or register to view this content. Registration is FREE
|