Jump to content

PravinS

Members
  • Posts

    459
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by PravinS

  1. You can use simple for loops for it.

     

    For Day

    for($d=1;$d<=31;$d++)
    {
    // option tag with value and text as $d
    }
    

     

     

     

    For Month

     

    for($m=1;$m<=12;$m++)
    {
    // option tag with value and text as $m
    }
    

     

     

    Form Year

     

    for($y=date("Y")-90;$y<=date("Y");$y++)
    {
    // option tag with value and text as $y
    }
    

     

     

  2. Use like this

     

     

    <select size="1" name="cat_show" id="cat_show"> 
    <option value="1" <?php if($e['cat_show'] == 1) echo " selected ";?>>Yes</option> 
    <option value="2" <?php if($e['cat_show'] == 0) echo " selected ";?>>No</option> 
    </select>
    

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.