i have the code :
$filename = $dataDir . $id . ".dat";
header ("Content-Type: application/octet-stream");
header ("Content-Disposition: attachment; filename=$realname");
readfile($filename);
$query = "UPDATE data SET status = '$SESSION_UID' WHERE id = '$id'";
$result = mysql_db_query($database, $query, $connection) or die ("Error in query: $query. " . mysql_error());
ok
so the problem is that when the header
sent a pop-up window arise asking from
you to open or save or ...etc
if you press save or open that ok the
query will execute ok but what if you
press cancel the query will be also executed
so i need a mechanizem to prevent
the qeury from executing when the user
press cancel i search in javascript
and didn't found some thing help me
so is there any one can help me ?
shamoco