Okay but what im realising Is that the <form> tak must be at teh top and for the Variable to really work the Redirection part needs to be at the bottom before the submit button.. I THOUGHT this would be simple but being a newbie i was wrong.
Heres my mess
and its just a test page for now and i changed a few things hoping it would work but no such luck.
<?
include("config.php");
?>
<head>
<title> Sign-Up | KubeMail: E-Mail now has a Third Dimension</title>
<? if ($signup) { ?>
<!-- Begin Validation for First and last name -->
<body>
<?
If ($error == -1) { ?>
<form method="POST" name="Signup" action="test.php">
<? } ?>
<? If ((empty($error) or ($error > 0))) {?>
<form method="POST" name="Signup" action="edit2.php">
<? } ?>
<tr>
<td></td>
<td colspan=2>
<?
if ($FirstName=='') { ?>
<p><font face="Arial" size="2" color="#FF0000">No First Name Entered. Please Enter your First Name</font><br>
<? }?>
<?
if ($LastName=='') { ?>
<font face="Arial" size="2" color="#FF0000">No Last Name Entered. Please Enter your Last Name</font></p>
<? } ?>
<?
if(($FirstName == '') or ($LastName == '')){
$error=$error+1
?>
</td>
</tr>
<tr>
<td width="111"><font class="sbd" size="2" face="Arial">First Name*</font></td>
<td width="189">
<input type="text" class="Wf" name="FirstName" size=23 maxlength=40 style="background:#D7D7D7" value="<? print ("$FirstName"); ?>">
</td>
<td bgcolor="#D7D7D7" rowspan=2 width="256"><font class="s" size="2" face="Arial">Your full name
will be sent with all outbound mail messages.</font></td>
</tr>
<tr>
<td width="111"><font class="sbd" size="2" face="Arial">Last Name*</font></td>
<td width="189">
<input type="text" class="Wf" name="LastName" size=23 maxlength=40 style="background:#D7D7D7" value="<? print ("$LastName"); ?>">
</td>
</tr>
<?
} else { $error=$error-1
?>
<input type="hidden" name="FirstName" value="<? print ("$FirstName"); ?>">
<input type="hidden" name="LastName" value="<? print ("$LastName"); ?>">
<input type="hidden" name="error" value="<? print ("$error"); ?>">
<?
}
?>
<input type="submit" name="signup" value="Sign Up!">
<!-- End Validation for Firstname and lastname -->
<?
} else {
?>
<form method="POST" name="Signup" action="<? $PHP_SELF ?>">
</td>
</tr>
<tr>
<td width="111"><font class="sbd" size="2" face="Arial">First Name</font></td>
<td width="189">
<input type="text" class="Wf" name="FirstName" size=23 maxlength=40 style="background:#D7D7D7" value="<? print ("$FirstName"); ?>">
</td>
<td bgcolor="#D7D7D7" rowspan=2 width="256"><font class="s" size="2" face="Arial">Your full name
will be sent with all outbound mail messages.</font></td>
</tr>
<tr>
<td width="111"><font class="sbd" size="2" face="Arial">Last Name</font></td>
<td width="189">
<input type="text" class="Wf" name="LastName" size=23 maxlength=40 style="background:#D7D7D7" value="<? print ("$LastName"); ?>">
</td>
<td><input type="submit" name="signup" value="Sign Up!"></td>
</form>
<?}?>