ok you can use empty() this way if(!empty($_POST['Added_By'])){ $Added_By = $_POST['Added_By']; } elseif(!empty($_POST['Added_By_Date'])){ $Added_By_Date = date('Y-m-d',strtotime($_POST['Added_By_Date'])); } elseif(!empty($_POST['Nexx_Part'])){ $Nexx_Part = $_POST['Nexx_Part']; } ................ else{ header('location:redirect to form page') } hope will help you
The hidden input is just a check that should be unique to that form, so we can see if the form has been submitted.