i have this code in delete.php
[code]ask(“Do you want to delete the relations?”);
it’ll execute this function :
[code=php]
function ask($answer) {
global $connection;
$return .= “<script language=”javascript”>n”;
$return .= “var x=confirm(‘$answer’);”;
$return .= “if(x==true){“;
$return .= “var go = ‘yep’ ;”;
$return .= “alert(‘Proceed’); }”;
$return .= “else{“;
$return .= “alert(‘Terminated’); }”;
.
.
.
with ask function, i want to execute this code in the same file if i answer ‘OK’ (if x==true)
[code=php]
for($idCounter = 0;$idCounter<=9999;$idCounter++){
if($_GET[$idCounter] != “”){
$id[$i] = $_GET[$idCounter];
jdebug($id[$i]);
//delete address table
$query02 = mysql_query(“DELETE FROM `address`
WHERE `id` IN (SELECT `address_id` FROM `address_relation`
WHERE `relation_id` = ‘$id[$i]'”);
.
.
.
how to make this happen?
thx