Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006

    Question Unanswered: Comma seperated values from Multi-form

    Hello, this is my first post on this forum, so I hope someone can help me and give me great first impression.

    I have a slight problem.

    I use the GET variable, and want a LIST with possibility to make multiple choices view as comma-seperated values in the URL.

    Now (problem)
    PHP Code:
    <select name="smak" size="6" multiple id="smak">
    do {  
                    <option value="<?php echo $row_smak['snavn']?>"><?php echo $row_smak['snavn']?></option>
    } while ($row_smak mysql_fetch_assoc($smak));
    $rows mysql_num_rows($smak);
    $rows 0) {
    $row_smak mysql_fetch_assoc($smak);
    And Uses this form thingy
    PHP Code:
    <form method="GET" name="icemaker" id="icemaker" action="index2.php" enctype="multipart/form-data"
    The problem with this is that is gives me a string like:

    I would like it to show: smak=value1,value2,value3

    How can this be done?

  2. #2
    Join Date
    Apr 2005
    Baltimore, MD
    What is the point of having the comma separated list? smak=value1&smak=value2&smak=value3 is correct and how forms are handled - you don't really want to mess with this. Are you just having trouble parsing the values in your php script after the form is submitted?

Posting Permissions

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