Hey,
I've got the following insert sql statement:
INSERT INTO table (ref,EXT_hours,NP_hours,WG_hours) VALUES( '".$_POST['ref']."',".$_POST['EXT_hours'].",".$_POST['NP_hours'].",".$_POST['WG_hours'].")
the problem is when the user enters say only the "ref" and "EXT_hours" it throws an SQL error as there are no values being entered in to NP hours and WG hours.... the SQL looks like
INSERT INTO table (ref,EXT_hours,NP_hours,WG_hours) VALUES( 'test',1,,)
and as there are no numbers being entered it gets an error.... what do you recommend I do? Is there a simple solution?!