need help in setting default field in PHP

Discussion in 'PHP' started by diths802, Feb 5, 2009.

  1. #1
    Hi, I got the php script below from a form generator and i don't know to edit it to be able to get a default value or selected value. I would appreciate anyone who could help me on this :)

    1. How to set "2009" default Year?

    selectList( "field_0_YYYY", $_POST["field_0_YYYY"], date("2009"), date("2010"), "YYYY", $style ) ;

    2. How to set "Red" as the default Motif with these script below:

    <?php phpfmg_dropdown( 'field_7', "Any|Aqua Blue|Ash Blue|Avocado Green|Baby Pink|Battle Green|Black|Burgundy|Fuchsia Pink|Gold|Gray|Lavender|Maroon|Mint Green|Mocha|Old Rose|Orange|Peach|Red|Royal Blue|White|Yellow", '' );?>
     
    diths802, Feb 5, 2009 IP