Custom wordpress Form submission

admin

Administrator
Staff member
I want to insert data into database table through custom php form in wordpress. I don't want to use/create plugins/hooks. just simple form for client so he can edit himself whenever he want.

I tried <br>

Code:
if($_POST['submit'])
{&lt; submit to db &gt;
} else {
&lt; display html form &gt;&lt;br&gt;
}

<br>with action="" . this redirect to the same page without any error on page + in console. javascript validations on fields are working perfect.

I tried another solution by creating a php file in themes folder, and setting action="../that_file.php", which gave 404 error.

Any other solution?