Jump to content

Dropdown List (Disable Item)

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Dropdown List (Disable Item) Rate Topic: -----

#1 User is offline   Man2u2uk 

  • W.R. Lieutenant
  • Group: Members
  • Posts: 396
  • Joined: 14-April 07
  • Gender:Male

Posted 22 September 2008 - 12:31 PM

Hi All,

I am currently trying to write a backend system to make managing the new php release of http://www.ukfishersonline.com/ easier.

My question is, can i show an item in a dropdown list, but stop it from being inserted into my database.

The reason i ask this is because i have : "Please Select" as the default option my my dropdown list. but i do not want people to be able to select it and submit it.

<select name="fishery_county" id="fishery_county">
            <option>Item1</option>
            <option>Item2</option>
            <option>Item3</option>
            <option>Item4</option>
            <option>Item5</option>
            <option>Item6</option>
            <option>Item7</option>
            <option>Item8</option>
            <option selected="selected">Please Select</option>
          </select>


Thanks
0

#2 User is offline   sypher 

  • the owner3r
  • Group: Administrators
  • Posts: 1,578
  • Joined: 04-April 06
  • Location:North Wales, UK
  • Interests:Art, Boxing, MMA, Graphic Design, Web Design etc. ;)

Posted 22 September 2008 - 12:44 PM

Give it a value.
<option selected="selected" value="error">Please Select</option>


Then when you process the form via php. Check the value. If its error then exit and show the form again with whatever info you want to include.
sypher design - North Wales Web Design | Latest Work: - Scala Cinema

CSS - Can't See Sh*t
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users