I have a very simple error handling function as such:
function checknull($tocheck){ //Verifies Form data isn’t null. REturns 0 instead if it is.//
if ($tocheck == Null)
{return (0);}
else
{return ($tocheck);}
}
Then I call it in the same php file as such:
//Assign user’s choices to variables//
$mc = checknull($_POST[‘MC’]);
$ca = checknull($
$cb = checknull($_POST[‘CB’]);
$cc = checknull($
$cd = checknull($_POST[‘CD’]);
$ce = checknull($
$cf = checknull($_POST[‘CF’]);
$cg = checknull($
Now, if I move the function to my my_functions.php file (which I already have included), I get the error that I cannot redeclare the function checknull()…
What am I missing this time? This is a learning exercise for me, and I have tried to solve my own problem with online tutorials, etc. but am stumped.