i need to run the php with two different parameters, when mouse is down and when mouse is up. how can i do this?
thanks.
i have this HTML:
<script src="jquery.js"></script>
<script src="jquery.form.js"></script>
<script>
$(document).ready(function() {
$('#mbed').ajaxForm(function() {});
});
</script>
</head>
<body>
<form id="mbed" target="_blank" action="mbed.php" method="post">
<input type="submit" name="increment" value="Faster">
<input type="submit" name="decrement" value="slower">
and this file - mbed.php:
<?php
if(isset($_POST['increment'])) {
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$msg = "FF0100";
$len = strlen($msg);
socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345);
socket_close($sock);
}
if(isset($_POST['decrement'])) {
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$msg = "FF0101";
$len = strlen($msg);
socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345);
socket_close($sock);
}
?>