SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    i don't know how to see the values i select in a list form

    I want to see the values wich i select in a list form.

    The code is :
    "
    <select name="categoria_insert" size="3" id="categoria_insert">
    <option>A</option>
    <option>B</option>
    <option>C</option>
    <option>D</option>
    <option>E</option>
    </select>
    "

    If i select options 'A' and 'D', for example, the value posted in $_POST['categoria_insert'] when i push the submit button is only 'D', not 'A' and 'D'.

    Help me please.
    Thank you.

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello mobutu_LM2006, and welcome to Sitepoint!

    What server-side language are you using to process your form? It looks like you're using PHP, but I thought I'd ask to make sure before offering any advice. I'm asking because it sounds like the problem is with the script not returning the proper values to be output to the browser as (X)HTML.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Little Rock, AR USA
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think the select tag will accept multiple selections without some scripting If I understand the question.
    Chip Simons
    Asgard Media

  4. #4
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,727
    Mentioned
    43 Post(s)
    Tagged
    0 Thread(s)
    Hi.

    You're also missing the "multiple" attribute...


    <select name="categoria_insert" size="3" multiple id="categoria_insert">

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Little Rock, AR USA
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh yeah but you have to use the Ctrl key so it's not that user friendly. If you don't have a lot of options I would go with check boxes
    Chip Simons
    Asgard Media

    Asgard Media Internet Marketing

  6. #6
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what the title attribute is for .

  7. #7
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,727
    Mentioned
    43 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by csimons
    ...it's not that user friendly.
    I wouldn't agree. If he puts some clear instructions beside it, it can be very user-friendly. I remember the Google AdSense list was something like this.


Bookmarks

Posting Permissions

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