Once all the sql queries are carried out in a page, what PHP should I use to redirect them somewhere?

Like in phpBB, redirect(append_sid("foo.com", true)); is used sometimes