Skip to content
Advertisement

About form submit with javascript

If I submit forms without input(type=”submit”) and I use a href with javascript, like this:

<a href="javascript:document.form-name.submit();" rel="nofollow">Button</a>

Is a way to check with php what form is submitted? (with input, I use if (isset($_POST['input-name'])))

Advertisement

Answer

Include a hidden field in your form that contains the form identification data you desire.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement