form.php
Code:
<form name="frm" action="submit.php" method="post">
<input type="submit" value="Delete" name="b1">
<input type="submit" name="b2" value="Save">
</form>
submit.php
Code:
<?php
if (!empty($_POST["b1"])){
echo "delete";
} else if (!empty($_POST["b2"])) {
echo "saved";
}
?>
no luck, nothing works for me, neither isset nor !empty
i have tried with
Code:
<?php
if (!empty($_POST["b1"])){
echo "delete";
} else if (!empty($_POST["b2"])) {
echo "saved";
}
?>
above condition working fine in firefox but print nothing when click on delete button and print saved when click on save in chrome
and
Code:
<?php
if (!empty($_POST["b1"])){
echo "delete";
} else {
echo "saved";
}
?>
above condition working fine in firefox but in both cased chrome is printing saved
i am trying to delete multiple records through delete button and wants to update a query through save button using check box in a single form, that's why i am trying to know, which button is clicked based on condition, so that i can perform particular action but no luck
i am using (Version 30.0.1599.101 m) chrome, any other way to do this?
Bookmarks