I have a PHP form and I submit it to itself a couple of times throughout the form so I can pull off variables. After the form submits I would like the cursor to return to the position it was at previously. I thought I could be tricky and do the following but it won't work. Can someone tell me if there is something wrong with my code or if this is simply something that cannot be done. The form is only reading my first statement. I am printing $ckSubmit to the screen so I can verify that the number is changing and it is but the cursor never gets moved to the new cell.
<?php if ($ckSubmit=1){?>
<body bgcolor="#CCCCCC" onLoad="document.form1.txtPrepby.focus()">
<?php } elseif ($ckSubmit=2){?>
<body bgcolor="#CCCCCC" onLoad="document.form1.txtPhase.focus()">
<?php } elseif ($ckSubmit=3) {?>
<body bgcolor="#CCCCCC" onLoad="document.form1.txtJobDesc.focus()">
<?php }
?>