Click to See Complete Forum and Search --> : Close window after query?


chrisb
06-18-2007, 08:09 AM
Hi All,

I perform a query in a pop-up window. How in php can I exit & close that window after the query has been performed:

ie something like:


$result = mysql_query("Update blah...);
header("javascript:exit()")


Thanks

Chris

jasonahoule
06-19-2007, 09:26 AM
if the pop-up page is reloading when the query is perfomed than you can do something like this...

if($_POST['submit'] == 'submit') {
// execute your query here...
echo '<script type="text/javascript">window.close()</script>';
}