I'm using a javascript to confirm a deletion when an image is pressed. I want the page to be redirected when you click OK at the confirm box. But the url has to include some variables from the php page like $name blah blah...
how can I include that into the javascript code when the javascript function is outside the php code?
confirm delete
Moderator: General Moderators
-
eektech909
- Forum Commoner
- Posts: 34
- Joined: Fri Jun 09, 2006 3:59 pm
Code: Select all
function codel() {
var message = "Are you sure you want to delete this show?";
var return_value = confirm(message);
if (return_value == true) {
window.location= "<?php echo ('del.php?thedate=' . ($row["DATE"]) . '&thevenue=' . htmlentities($row["VENUE"]) . '');
?>";
exit;
} else {
}
}del.php?thedate=&thevenue=
it didn't fill in the variables