My web page has two submit buttons "Add" and "Delete".
What is the best way to process the response (e.g. display pages)?
This is my approach.
Please comment.
My web page is:
<form name="mainform" method="post" action="Process.php?value1=<?=$value1?>" id="">
<input name="btnSubmit" value="Add" type="submit"/>
<input name="btnSubmit" value="Delete" type="submit"/>
Process.php is:
echo $_GET['value1'];
if ($_POST['btnSubmit'] == "Add") {
require_once "Add.php";
exit;
}
require_once "Delete.php";