hi all im posting a form. but if a field is empty the recorde dosent get entered into the database.
here is the field im posting
<input name="office_area" type="text" id="office_area">
this is the code to set the variable
if(isset($POST['office_area']))
$office_area = $POST['office_area'];
and to insert it into the database
$sql = "INSERT into property (office_area)".
"values($office_area)" or die("Invalid query: " . mysql_error());
if the field is filled in eg. 500 it works, if i leave it blank then it dosent get inserted into the database.
the field in the database is called
office_area its a INT length 11 and not null
if the user leaves it blank i want the default database value (0) to be entered.
anyone able to help.
cheers aron.