Hi Eric,
All you need to do is instruct PHP to write the javascript refresh code if a certain condition is met, for example:
if (isset($my_variable)) {
<script type="text/javascript">
window.frames[x].document.location.reload();
</script>
}
Cheers,
-D.