https://dev.webpages.dk/  
 
PHP How to Use ISSET()
PHP How do you Use Multiple Submits:

To be able to distinguish between submit buttons in the same <FORM> you can use ISSET.

In the ISSET you simply state the name of the submit button.

Here is an exemple of how the snip can look like:

if (isset($_POST['show1'])) {code here}

 ISSET()

How do you Use Multiple Submits in PHP?

In this posting we will look shortly at ISSET() in PHP.
This will show how you can use multiple submit buttons on the same page, yes, even in the same <FORM> tag.

 HTML

<HTML><BODY> 

<FORM METHOD='POST' ACTION='#'>
<INPUT NAME='show1' TYPE='submit' VALUE='Show text #1'>
<INPUT NAME='show2' TYPE='submit' VALUE='Show text #2'>
</FORM>

</BODY></HTML>

 PHP

<?php
    if (isset($_POST['show1']))  { 
        echo "You clicked the first submit button";
    }
    if (isset($_POST['show2']))  { 
        echo "You clicked the second submit button";
    }
 ?>
Icons made by Freepik from www.flaticon.com The way to use ISSET, for being able to have more submits in same <FORM>
13:22:26