i have a button and when the button is click i wan it to call a function to do some processing . However it wouldn't call the function . what when wrong?
<input type="submit" name="submit" onclick="counterminus()" id="submit" value="Buy!" <? function counterminus() { $cmeter = $cmeter - 1; mysql_query("INSERT orders SET quantity='$value',fbId='$fbme',fbName='$fbName', email ='$fbEmail', dealName='$dealName'" ); mysql_query("UPDATE stardeal SET cmeter='$cmeter'WHERE dealId='$dealId'"); echo '<script type="text/javascript">' , 'reloadPage();' , '</script>'; } ?>