Hello everybody,
I am wanting to use a javascript confirm popup (OK returns TRUE/Cancel returns FALSE) to determine whether I need to run part of my PHP code.
I could only think of one way to try, and this is it:
echo "<script type=\"javascript\">
var popbox = confirm(\"Are you sure you want to delete " . $x . " entries?\");
if(popbox){";
php_code();
echo "}
</script>";
But... since Javascript is client-side I know this might not be possible, so my question is, CAN I do this? And how?