I have a simple form with 2 text fields in my WordPress site. I created a new page template and added the following HTML code:
This is the HTML:
<form action="<?php the_permalink(); ?>" id="customform" method="post">
Field 1: <input type="text" name="field1" id="field1">
Field 2: <input type="text" name="field2" id="field2">
<input type="submit" name="submit" id="submit">
</form>
Now all I want to achieve, is that whatever the user inputs, it stores it to mySQL (which is in the same database as WordPress), in the table test_form, for example.
How do I achieve this?