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>
    

     

     

  3. Try this

     

     

          INSERT INTO
            `tasks` (
              `id`,
              `challenge_id`,
              `title`,
              `frequency`,
              `category`,
              `description` 
          )
          VALUES 
            (
              "",
              12,
              "title1",
              "frequency1",
              "category1",
              "somedesc1"
            ),
            (
              "",
              12,
              "title2",
              "frequency2",
              "category2",
              "somedesc2"
            ),
            (
              "",
              12,
              "title3",
              "frequency3",
              "category3",
              "somedesc3"
            ); 
    

     

     

     

×
×
  • 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.