suntra, that great it works now thnaks for that!
masood or any1 else, when you say use the print function to print it within the php block could i print some text to the form through a $var and end the php code then get html code after the php 2 access the $var and print it to the window.status?
i.e
<?php
if ($blah = 1) {
$var = "Successfully connected."
else
$var = "Errro in connection."
}
print $var
?>
<body onLoad="window.status=$var ;return true"> </body>