Hey, I was having a PHP coding issue with html form submission:
<a name="sub2" class="control1" href="javascript:document.forms[0].submit()">Delete selected records</a>
I wanted to make an if statement so that if the user clicks on that href above, it will echo "TEST". Presumably, that would look like this:
if ($sub2) echo("Test");
however that is not working. If i were to use submit buttons, however, it would work properly. Any suggestions here?
I have form method=post all taken care of already, and when I click on the link the javascript seems to run and submit the form.
(the if statement just doesn't seem to catch that the link was clicked)
Any suggestions? Thanks!