Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

list/menu data passing

New Here ,
May 17, 2006 May 17, 2006
Im sure this is an easy one but it has me stumped. Here is the scenario:

I have a couple list/menu boxes that allow mulitple selections. I process a few other items through a php script that sends an e-mail out to a specified e-mail address. Everything works as planned except I only get the last item selected in the list/menu boxes all the way through to the e-mail.

I have tried adding the ' [ ] ' syntax as discussed in a few other articles but have not been able to get this to work.

Can anyone offer any help? I would be more than glad to explain myself further or attach some code. Thanks in advance!

Sean
TOPICS
Server side applications
222
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

New Here , May 19, 2006 May 19, 2006
Ok I got the fix.

I added the '[ ]' on the variable in the form, so the code looks like this:

<select name="email[]" size="4" multiple id="email">
<option value="1 Accounting">1 Accounting</option>
<option value="1 Adjustments">1 Adjustments</option>
</select>

Then I went to the script that processes the form and change my variable definitions to this:

$FTGemail = implode(',',$_POST['email']);

Translate
New Here ,
May 19, 2006 May 19, 2006
LATEST
Ok I got the fix.

I added the '[ ]' on the variable in the form, so the code looks like this:

<select name="email[]" size="4" multiple id="email">
<option value="1 Accounting">1 Accounting</option>
<option value="1 Adjustments">1 Adjustments</option>
</select>

Then I went to the script that processes the form and change my variable definitions to this:

$FTGemail = implode(',',$_POST['email']);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines