Jump to content

Chetan

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Posts posted by Chetan

  1. Uh sorry, Another way
    [code]
    for($u=0; $u<=$num2; $u++)
    {
    $flds='';
    $dat='';
    for($i=0; $i<=$num; $i++)
    {
    $flds.='$fields['.$i'.],';
    $dat.='$data['.$i.'],';
    }
    $flds=substr($flds, 0, -1);
    $dat=substr($dat, 0, -1);
    $exec = '$sql = \'INSERT INTO $table['.$u.']($flds) values($dat]);';

    // For debugging, you may uncomment this code
    // echo($exec);

    eval($exec);
    mysql_query($sql);
    }
    [/code]

    This should do it
×
×
  • 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.