noty jquery confirmation and php execution
<p>I am using the noty jquery notification <a href="http://needim.github.com/noty/" rel="nofollow">http://needim.github.com/noty/</a> in one app that i am currently working on. It provides a "confirm" function but i would like to execute something in php when the visitor is pressing "ok" and execute something else when the visitor is pressing "cancel". How can i add this functionality to my script? 
So far my code(particular segment) is the one below:</p>

<pre><code>&lt;?php
    //add2cart section
if(isset($_POST['add2cart'])){
//$plus1 = +1;
$order_date = date("Y/m/d");
$img_name = $_POST['img_name'];
//$color = $_POST['color'];
$sqldata = "select * from orders where img_name = '$img_name' and 
sess_user = '$user and checkout= ' ' "; 
$dataselect = mysql_query($sqldata);
$sqlnum = mysql_num_rows($dataselect);
if($sqlnum &gt;= 1){?&gt;
    &lt;script type="text/javascript"&gt;
noty({"text":"This item is already in your cart. 
Are you sure you want to add it one more time?","layout":"center","type":"confirm","textAlign":"center","easing":"swing","animateOpen":{"height":"toggle"},"animateClose":{"height":"toggle"},"speed":"500",buttons: [
  {type: 'button green', text: 'Ok', click: function($noty) {

      // this = button element
      // $noty = $noty element

      //$noty.close();
      noty({force: true, text: 'You clicked "Ok" button', type: 'success'});
    }
  },
  {type: 'button pink', text: 'Cancel', click: function($noty) {
      //$noty.close();
      noty({force: true, text: 'You clicked "Cancel" button', type: 'error'});
    }
  }
  ],
closable: false,
timeout: false});                        
    &lt;/script&gt;
&lt;?php          
}else{?&gt;
    &lt;script type="text/javascript"&gt;
        noty({"text":"Item added.","layout":"center","type":"success","textAlign":"center","easing":"swing","animateOpen":{"height":"toggle"},"animateClose":{"height":"toggle"},"speed":"500","timeout":"3000","closable":true,"closeOnSelfClick":true});                        
    &lt;/script&gt;
&lt;?php
$sizevalue = '5\" x 7\"(13 x 19 cm)';
$sql_order ="insert into orders(item_id, img_name, quantity, color, order_date, sess_user, size, unique_id) values(' ', '$img_name', '1', 'Color', '$order_date', '$user', '$sizevalue', '$unique_id')";
mysql_query($sql_order);    
}
}
?&gt;
</code></pre>

<p>I would appreciate any help, thank you for your time.</p>
