From your description I'm assuming that popup contains the form being submitted. I've never done anything like this before, but I figured perhaps you could add a target attribute to the form tag, saying which frame you want the response to appear in. Making it then disappear...two ways spring to mind, neither of which I'm certain will work. First, an onSubmit handler attached tothe form, which does a window.self.close() (or whatever the Javascript is), or an onload() handler in the response page that closes the popup. Either way it's more of a Javascript/HTML problem than a PHP one.