Hi all,
I am new to WP world and I am starting developing a custom plugin that will show a form and after sending it, the data will be stores on DB but I don't know how to do that...
I'm using the shortcode API so the forms are inserted into posts using something like [form name="my_form"]
What will be the action attribute on the form? I'm using the_permalink()
but if the form is sent and with the fields filled, wordpress shows an 404 error...
My code is something like this:
<br />
if ( isset($_POST['send_button_name'] )<br />
{<br />
print_r( $_POST );<br />
}<br />
else<br />
{<br />
show_form();<br />
}<br />
If no field is filled, the code works and the post array is displayed but if an input is filled it shows me a 404 error.
Can anyone help me on this?
If this is not the correct way to do this (A plugin that shows a form a stores data on DB) I will be glad to hear other solutions.
Thanks in advance