how to check if input type button is pressed in php?
<p>the isset function can be used to check if input type submit is pressed but is there any way to check if the input type button is pressed?in my code the button does nothing but call a function on onclick event which then refreshes the page and makes a database entry inside php...and i want it to make the entry only after the button is pressed...and i cant use the sumbit type for other reasons...following is some code</p>

<pre><code>   function send(){
  var events=document.getElementById("event").value;
  location.href="calm.php?day=" + xx + "&amp;month=" + yy + "&amp;year=" + zz + "&amp;events=" +                  events;      
   }
 &lt;input name="Button" type="button" id="submit" onclick="send(this.form)"       value="Button" /&gt;
&lt;?php
session_start();
include_once "connect_to_mysql.php";
$day = $_GET['day'];
$month = $_GET['month'];
$year = $_GET['year'];
$events = $_GET['events'];
$userid = $_SESSION['id'];
if (isset($_POST['button']))
{ $sql = mysql_query("INSERT INTO events (userid,month,day,year,events) 
 VALUES('$userid','$month','$day', '$year','$events')")  
 or die (mysql_error());}
</code></pre>

<p>?></p>
