Display result of custom form
First, your code attempts to use $_POST[‘nom’] whether the value is set or not. You are generating non-fatal “Undefined index” warning every time that runs. Clean that up and use !empty($_POST[‘nom’]) instead of $_POST[‘nom’]!=NULL. With template_redirect you’d want to redirect to an existing page, something like the following from another answer: function redirect_cat_wpse_207298() { if … Read more