Hi,
 
You can get aroung this type of problem by identifing the filed type and then add an default value of the field when the record is null 
provided by PHP .
 
Make an function to do this .
 
As.
1. function(DATA_TYPE,PG_FIELD,DATA,DEFAULT_VALUE)
 
    {
// DATA_TYPE is an array that  contains the datatype of the PG_FIELD
//PG_FILED is the array of column name in which you would like to insert the  data
//DATA is the array of the data you retrived from your form
//DEFAULT_VALUE this is the array of the default values  
 
NOW loop thru the DATA array and  when an null value is found
replace it with the deafult value 
 
TIP :
You may use 
1 for loop
2. For each loop
}
 
If you want an working example revert back .
Regards
Aspire420