Jump to content

[SOLVED] two buttons in a form


blufish

Recommended Posts

if you want to check which one was pressed instantly, you need to use either Javascript or AJAX.

 

otherwise, you can find out with PHP...

 

<?php

if(isset($_POST['button1'])) {
  echo "Button 1 was Pressed!";
} elseif(isset($_POST['button2'])) {
  echo "Button 2 was Pressed!";
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.