php - inserting the data if the column name matches with it -
i trying insert data database. in database have columns this:
mid, 1,2,3,4,5 till 31
and when user registers (here mid month id 1 12) , take date on day
$date_of_admit=date('y-m-d'); list($year, $month, $day) =explode("-",$date_of_admit); $month = (int)$month;
now, have insert 'p' day matches, if day 4 should insert 'p' in column 4 . not getting how proceed.
please suggest
updated
$selquery = "select * attendance"; $columnname = mysql_field_name($selquery, $day);
if can column name can achive couldnt
Comments
Post a Comment