Need help with SELECT FORM - drop down

Discussion in 'HTML & Website Design' started by webmoney, Feb 9, 2010.

  1. #1
    I have in database list of "sizes" which are in inches.

    I want to make SEO friendly links to each size... if there was only 10 sizes than I would do it simple way... but I need to list about 100 links.

    I was thinking about drop down list using SELECT FORM.
    But problem is that it pass through only the VALUE and nothing else... in VALUE I put there URL (SEO friendly "size-1__2_x_1__3.html") but in database is value 1 '2 x 1 '3 which should be displayed on outgoing page size-1__2_x_1__3.html

    There might be better option how to make "1 '2 x 1 '3" clean link and get it back to same value...

    Or in the SELECT someohow implement HIDDEN FORM which would depend on selection made and than it would be transferred.

    Is this clear?
     
    webmoney, Feb 9, 2010 IP
  2. sp2h

    sp2h Peon

    Messages:
    189
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #2
    what the language you use for coding if php... then you use $link = str_replace('_',"'",str_replace('_',' ',$pattern)).".html";you get the link... is this clear?
     
    sp2h, Feb 9, 2010 IP
  3. webmoney

    webmoney Well-Known Member

    Messages:
    1,119
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    155
    #3
    yes, that is what I use to get 1__2_x_1__3.html but on landing page I need to get again 1 '2 x 1 '3 to be able to find it in database....
     
    webmoney, Feb 9, 2010 IP
  4. sp2h

    sp2h Peon

    Messages:
    189
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #4
    $link = str_replace('_',"'",str_replace('_',' ',$pattern)).".html";

    <select>
    <option value="<?=$link;?>">$pattern</option>
    </select>

    with out replace value you call in option field you get 1 '2 x 1 '3 is that clear? if not contact me on email i solve the your problem buddy... tc
     
    sp2h, Feb 9, 2010 IP
  5. webmoney

    webmoney Well-Known Member

    Messages:
    1,119
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    155
    #5
    Yes this is what I do and thanks for helping... I am looking how to pass that further to the other page so its possible to use it in search query and look for this value in DB...

    Or is $pattern transferred? Than how do I get this value on landing page?
     
    webmoney, Feb 9, 2010 IP
  6. webmoney

    webmoney Well-Known Member

    Messages:
    1,119
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    155
    #6
    Someone can help?
     
    webmoney, Feb 16, 2010 IP