this is what i would do.
form.php
<form action= "checkuser.php" method= "post" name= "login" id= "" >
<td width="188" valign="top"> <input name= "username" type= "text" id= "username" value="<?php echo $REQUEST['u']; ?>"> </td>
<td valign="top"> <input name="password" type="password" id="password" value="<?php echo $REQUEST['p']; ?>"> </td>
<td valign="top"> <input type="submit" name="submit" value="submit"> </td> </form>
checkuser.php
foreach ($_POST as $key => $value) {
if($_POST[$key] == ""){
$url = "?u=".urlencode($_POST['username']);
$url .= "&p=".urlencode($_POST['password']);
header("Location: [url]http://[/url]$_SERVER[HTTP_HOST]/form.php$url");
}
the foreach makes sure that all the fields are filled out, if they aren't, the user is redirected back to the form.php page with anything else filled out. otherwise, if all the fields ARE filled out, the code continues.
hope that helps.