I have a form which is being echoed by php:
echo '<form action="stsupport.php" method="POST">
<p>
Priority Name: <input type="text" size="50" name="ticketpriority" placeholder="Input a name for your priority..."></textarea>
</p>
<input type="submit" name="submitpriority" value="submit">
</form>';
I want the stsupport php file to run when the form is submitted but I am getting 404 error when the form is submitted.
The stsupport.php file is in the same folder as the file with the form.
Any ideas?
Edit:
This is in the support.php file where i call the function to create priority. The create priority function just displays the form above.
require_once(ABSPATH . 'wp-content\plugins\stsupport\adminmenu.php');
create_priority();
When the form is submitted i want to run:
function st_support(){
require_once(ABSPATH . 'wp-content\plugins\stsupport\adminmenu.php');
create_priority();
if (isset($data['submitpriority'])) {
insert_priority();
}
}
The insert_priority function is inside the adminmenu.php file