In PHP you can define input's name just like this: if (isset($_POST['name'])) {}
, but my question is how can I define exactly this post (<form method='post' action='action.php'>
with this name (name='post_name'
) exists.
So the whole HTML would be like this:
<form method='post' name='post_name' action='action.php'><input name='name' /></form>
I'm trying to achieve this, because I have more forms on my page and I want to work with exactly this one. I can theoretically change action=''
, but I want to have it in same file or do this: if (isset($_post_name)) {}
, but it doesn't work.