Hello,
I want to be able to check conditions within a javascript function and do certain php commands accordingly.
Eg:
<script language="javascrip">
function blah() {
if(document.blah.checked == true) {
//Now this doesnt get run until the function
//that this condition is in
--> alert("blah");
//but this gets run straight away
//when the page loads!!!
//whats the story?
--> <?php
delete stuff from database...etc
?>
}
}
</script>
Any PHP commands I have within the javascript gets run straight away. So it looks like the javascript has no control over the php. Is there a way around this, I only want to delete certain things from a database as you can imagine..not it all!!!
Thanks in advance
Patrick