Try this:
in the top of your pop up document that shal close the window:
do the query and then do a check if it was successful,
after the </head>
eg.
if (successfull) {
//if the operation was successfull, send message back to the opener document and close this one.
echo "<body onLoad="JavaScript: opener.location.href='opener_doc.php?action=update'; self.close();">
}
else {
//if it fails do some output to the user.
echo "<body>";
echo "Error message to the user";
}
if the opener window is part of a frame set, use:
opener.parent.frameName.location.href='';
good luck.
regards Thomas A.