Custom form that store input in database
I have never used WordPress before, but have done a lot of programming. But what is the normal way of making customs forms?
I need to create a form where a user fill some input fields and on submit will the data be stored in the database. No need for any email.
I also need to query the data and get the output in a HTML table.
I am going to use this solution, but it seams to be very customize and can that be a problem with themes and upgrades?
The way I see it, you should separate the logic from the template file. Your method that handles the POST data should be located in functions.php and initialized by a initialization hook. To only handle the submitted data for a specific page template, you could check for a named (optionally hidden) input field that's unique for that template. You could also benefit of using is_page_template()