Results 1 to 2 of 2

Thread: Data Validation

  1. #1
    Join Date
    Apr 2006
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Data Validation

    I have the next PHP code:

    PHP Code:
    <select name="day" id="day" tabindex="3">
                                          <?php
                                            
    for($n=1$n <=31$n++)
                                            { 
                                        
    ?>
                                        <option value="<? echo $n ?>"><? echo $n ?></option>
                                        <?
                                            
    }
                                        
    ?>
                                        
                                </select>
                      
                                      <select name="month" id="month"  tabindex="3">
                                        <?php
                                            
    for($n=1$n <=12$n++)
                                            { 
                                        
    ?>
                                        <option value="<? echo $n ?>"><? echo $n ?></option>
                                        <?
                                            
    }
                                        
    ?>
                                      </select>
                                      
                                      
                                      <select name="year" id="year" tabindex="3">
                                       
                                        <?php for($i=0;$i<3;$i++) { ?>
                                          <option><?php echo(date('Y') - $i); ?></option>
                                        <?php ?>

                                      </select>
    I wan´t to validate the data input. How can I do it??

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You have this in a form, yes?

    The user submits the form, yes?

    Next page, use php to check what was chosen. (if....)

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
  •