I'm using header() function to go a page with a specific frame. Is there anyway to do this?
Not really. You should use Javascript redirection, because PHP doesn't know a thing about frames displayed on client browser.
echo "<script language=Javascript>window.top.frame_name.document.location.replace('mysweetyURL')</script>";