findOrFail($id); if(!$findId->delete()){ echo "Error could not delete record"; }else{ header("location: ../../Frontend/home.php?recordDeleted"); } }