Crashin
11-26-2002, 04:05 PM
I've got a link:
<a href="index.php?go=1&&id=<?php echo $row['id']; ?>" onClick="return confirm_delete();">Delete</a>
That calls the function:
function confirm_delete() {
var choice = confirm("Are you sure you want to delete the album?");
if (choice == true) {
return true;
}
else {
<?php unset($_GET['go']); ?>
return false;
}
}
However, when "OK" is selected it just reloads the index page. It's not passing on the variables in the link (i.e. ?go=1&&id=<?php echo $row['id']; ?>). The go variable tells the index page what to do (i.e. delete the associated record). Thanks in advance for the help!
<a href="index.php?go=1&&id=<?php echo $row['id']; ?>" onClick="return confirm_delete();">Delete</a>
That calls the function:
function confirm_delete() {
var choice = confirm("Are you sure you want to delete the album?");
if (choice == true) {
return true;
}
else {
<?php unset($_GET['go']); ?>
return false;
}
}
However, when "OK" is selected it just reloads the index page. It's not passing on the variables in the link (i.e. ?go=1&&id=<?php echo $row['id']; ?>). The go variable tells the index page what to do (i.e. delete the associated record). Thanks in advance for the help!