sigh all empty submissions are being added to the db as a zero with each new record. So if I submit "23" for $POST['banana'] and leave $POST['apples'] empty, "23" and "0" are entered in the db instead of "23" and nothing (NULL).
The sql I used to create the columns was:
ALTER TABLE table_name ADD column_name INT(3) NULL
(for some reason I couldn't have default ='' (I presume because it's INT, sound right?) regardless, the db structure page within phpMyAdmin indicates that the default value is NULL).
So assuming it's a coding issue, I've tried...
$apples = $_POST['apples'];
if($_POST['apples'] == '') {$apples = '';}
$bananas = $_POST['bananas'];
if($_POST['bananas'] == '') {$bananas = '';}
$grapes = $_POST['grapes'];
if($_POST['grapes'] == '') {$grapes = '';}
$apples = $_POST['apples'];
$bananas = $_POST['bananas'];
$grapes = $_POST['grapes'];
$apples = $_POST['apples'];
if($_POST['apples'] == '') {$apples = NULL;}
$bananas = $_POST['bananas'];
if($_POST['bananas'] == '') {$bananas = NULL;}
$grapes = $_POST['grapes'];
if($_POST['grapes'] == '') {$grapes = NULL;}
$apples = $_POST['apples'];
if(empty($_POST['apples'])) {$apples = '';}
$bananas = $_POST['bananas'];
if(empty($_POST['bananas'])) {$bananas = '';}
$grapes = $_POST['grapes'];
if(empty($_POST['grapes'])) {$grapes = '';}
$apples = $_POST['apples'];
if(empty($_POST['apples'])) {$apples = NULL;}
$bananas = $_POST['bananas'];
if(empty($_POST['bananas'])) {$bananas = NULL;}
$grapes = $_POST['grapes'];
if(empty($_POST['grapes'])) {$grapes = NULL;}