Alıntı
  <?php
$sorgu=$_POST['sorgu']; 
 
echo '<center>
<script type="text/javascript">
var newCount;
function timer(position,count)
{
if (position == \'start\') {
document.getElementById("timer").innerHTML=count
newCount = count - 1
setTimeout("timer(\'go\',newCount)",1000)
}
 
if (position == \'go\') {
document.getElementById("timer").innerHTML=count
newCount--;
setTimeout("timer(\'go\',newCount)",1000)
}
}
</script>';
echo '<body onload="timer(\'start\',3);">
<div id="timer" />
 Saniye icinde <b>'.$sorgu.'</b> aramasina yonlendirileceksiniz.</center>';
echo '<meta http-equiv="refresh" content=\'3;URL=http://www.google.com.tr/#hl=tr&source=hp&q='.$sorgu.'\'>';
?>
Oda bu şekilde çalışıyor.
Dostum, HTML kodlarını <?php ?> taglarından önce yazabilirsin. Böylelikle sorun vermez.