I need some help creating a function called missing_field(). I want this function to do the same thing this would do:
if(!$username)
{
echo $regError['username'];
}
elseif(!$name)
{
echo $regError['name'];
}
What I am trying to do is, if the variables that I specify in the function isn't there, I want to display a custom error for each missing variable ($regError holds a bunch of error messages). How can I do this?
First off, it starts off as this right?:
function missing_field()
{
WHAT GOES HERE???
}