i have created an array called $errors,
the indexes for this array are the same as the $_POST indexes.
i want empty fields from $_POST to change the relevant $errors index to 1.
this is what i have come up with so far, which creates a new index of []
foreach ($_POST as $field)
{
if(empty($field))
{
$errors[$field] = 1;
}
}
could anyone point me in the right direction please.?
advance thanks