Hi,
We can code this way to print something if Exit button is clicked.
<form action="process.php" method="POST">
<input type="hidden" name="hiddenName" value="Jolly" />
<input type="submit" name="submit" value="Exit" />
</form>
if($_POST["submit"] == "Exit") {
echo $_POST["hiddenName"];
}
What about if we use this way. How do i check if Exit button was clicked or not?
<form name="formExit" action="process.php" method="POST">
<input type="hidden" name="hiddenName" value="Jolly" />
<a href="#" onclick="document.formExit.submit()" title="Exit">EXIT</a>
</form>
if( ???????????? == "Exit") {
echo $_POST["hiddenName"];
}
Thanks in advance