There is another way to do this.
Just add two different submit buttons on the page.
Now, there are two possible ways to continue:
Code:
//html form:
<input type="submit" name="SUBMIT1" value="submit">
<input type="submit" name="SUBMIT2" value="submit">
//php receiving page:
<?php
if (isset($_POST['SUBMIT1'])) { echo "Submit1 was clicked, not S2."; }
else { echo "Ok, S1 was not pushed. It must have been S2!"; }
?>
Code:
//html form:
<input type="submit" name="submit" value="YES">
<input type="submit" name="submit" value="NO">
//php receiving page:
<?php
if ($_POST['submit']=='YES') { echo "The submit value is YES!"; }
else { echo "Submit value is not yes. It must be NO!"; }
?>
Bookmarks