Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile how to manipulate data in list/menu/drop down box

    Greetings everyone,

    I need help regarding list/menu/drop down box. I created a list of courses, and user can choose the course that they wish to join from the list. When submit button is clicked, a confirmation email will be sent to them. So, my problem is, my email will display the same variable although different courses were selected by users. I mean the courses selected by the user does not displayed correctly in the email, but the name of the menu will be displayed. For example, if a user select course A from the list, and the form is submitted and and email is sent to the user, name/label of the menu will be displayed instead of Course A. How can i display all the name of variables in the list instead of displaying the label of the list box? Below is the coding for the menu/list. Your help is greatly appreciated. Many thanks.

    PHP Code:
    <td class="brbd">Please select the course or program that you are registering 
              
    for:<font color="#ED1C24">*</font></td>
             <
    td><select name="Courses_Registered" class="FT"  id="Courses_Registered" style="width: 255;">
               <
    option selected>Please Select</option>
               <
    option> </option>
               <
    option>: : Designation Programs : :</option>
               <
    option value="CRM 11">CRM 11</option>
               <
    option value="CRM 12">CRM 12</option>
               <
    option>: : Seminars and Workshops : :</option>
               <
    option value="RV 1">RV 1</option>
               <
    option value="OE 1">OE 1</option>
               <
    option value="HO 3">HO 3</option>
               <
    option value="HO 4">HO 4</option>

              </
    select

  • #2
    Regular Coder
    Join Date
    Mar 2004
    Posts
    115
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i may be way off but if they can select multiple entries from list
    Courses_Registered will be an array

    so a
    foreach($Courses_Registered as $key => $value)
    {
    // do somthing with each var
    }
    were key is the index of array item
    and value its corisponding value



    post the bit that generates the email


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •