Results 1 to 2 of 2

Thread: Help with form...

  1. #1
    Join Date
    May 2007
    Location
    England, UK
    Posts
    235
    Thanks
    3
    Thanked 6 Times in 6 Posts

    Question Help with form...

    Hi,
    I've created a select menu which links with my php page and works fine, but I need to create a few options that go to an exact url.

    Is this possible?

    HTML Code:
    <form action="mypage.php" method="post">
    
      <select name="choice">
    
        <option value="one">one</option>
        <option value="two">two</option>
        <option value="three">three</option> 
        <option>Go To URL</option> 
    
      </select>
    
    <input type="submit" value"Submit" />
    
    </form>
    

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I need to create a few options that go to an exact url
    What exactly do you mean by this? You could make the option have whatever values you want (as long as they are not HTML code like <b>, <u>, etc):

    Code:
    <select name="choice">
     <option value="http://example.com">Example.com</option>
     <option value="testing">This is a test</option>
    </select>
    As for making it to where when the user choices a website from your list it redirects that user to their choice, then that would use some javascript. There is a script on DD that does this, but not sure of the URL off the top of my head. If neither of these are what you are after, please be more specific.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

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
  •