header( "refresh:5;url=wherever.php" );
indeed you can use this code as teneff said, but you don't have to necessarily put the header before any sent output (this would output a "cannot relocate header.... :3 error").
To solve this use the php function ob_start();
before any html is outputed.
To terminate the ob just put ob_end_flush();
after you don't have any html output.
cheers!