Hey
I've got a mysql query that I'd like to process *only* if a javascript if is true. Is that possible?
Something like this:
Somehow, as soon as the web is loaded, the query is sent.
Thank you :)
I've got a mysql query that I'd like to process *only* if a javascript if is true. Is that possible?
Something like this:
Code:
<script language="javascript">
if (condition is true) {
<?php
$query = "UPDATE table SET example = '3' WHERE id = '1'";
$result = mysql_query($query);
?>
alert('Example');
window.location.reload()
</script>
Thank you :)
Comment