Finally it works.
Somehow it didn't work without output buffering, but here is how i did it:
<?
if (@$page=="pleasewait")
{
ob_start();
print "<HTML><HEAD><META HTTP-EQUIV='Refresh' CONTENT='1;URL=search.php?page=search&kentta=$kentta&haku=$haku'></HEAD><BODY>";
print "Please wait while searching......<br>";
ob_end_flush();
}
if (@$page=='search')
{
ob_start();
OpenDB();
if ($kentta==1) { $hakuk="valmistaja"; }
if ($kentta==2) { $hakuk="tuotenimike"; }
$SQL="SELECT * FROM hinnasto where $hakuk LIKE '%$haku%'";
$yhteys=mysql_query($SQL);
while ($stuffi=mysql_fetch_row($yhteys))
{
print "ouput....";
}
mysql_close();
ob_end_flush();
}
and below is form which calls this page with search.php?page=pleasewait&haku=something&kentta=1
.. I hope that someone has some use of this =)