Reputation: 33674
I have the following code:
<form>
.............
<?php
if (!isset($_FILES['before']['name'] || !isset($_FILES['after']['name'])
echo '<input type="submit" value="Show Image">'
else
echo '<input type="submit" value="Upload">'
?>
</form>
in my postback how do I check whether it's one or the other?
Upvotes: 0
Views: 150
Reputation: 42496
You give both submit buttons the same name
and then check its value in the postback with...
$_POST['submit_name']
Upvotes: 2