Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    271
    Thanks
    4
    Thanked 0 Times in 0 Posts

    PHP script modify question

    I am trying to design a form and running into a problem.I am trying to use a drop down and it is required BUT how do i make the first one blank so the have to change it to a different choice

    when i try to have the first one say select one the script thinks that is the choice


    <font face="Verdana" size="2">Destination</td>
    <td height="30" width="469" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
    <font face="Verdana"><select name='Destination'><option value='Alaska'>Alaska<option value='Canada'>Canada<option value='Caribbean'>Caribbean</select>*</td></tr><tr><td colspan="3" bgcolor="#B5CBEF" height="25" width="737" background="tile_sub.gif"><p align="center"><font face="Verdana" size="2">


    Thxs STEVE

  • #2
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    You'd have to handle that in your validation routine.

    IE something like...

    Code:
    <?php
    if($_POST['Destination']=="Select One") {
       echo "Please select a destination";
       return false;
    }
    ?>
    or something similar.


  •  

    Posting Permissions

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