Well i have to post a lot of data to another page if all fields are validated and after 6 days the only way i can seem to see it working is javascript but i cant seem to get the javascript to work and im loosingm y mind over it.
WOULD SOMEONE please help me make a stab and getting this to function? This is just a test page using 2 fields but teh actual page is using more like 20 or so.
Thnx.
<?
include("config.php");
?>
<head>
<title> Sign-Up | KubeMail: E-Mail now has a Third Dimension</title>
<script language = "javascript">
function decide func(error);
{
if (error==-1)
{
document.Signup.action = "test.php";
submit.Signup.submit();
return true;
}
else
{
document.Signup.action = "edit2.php";
submit.Signup.submit();
return true;
}
}
</script>
<title> Sign-Up | KubeMail: E-Mail now has a Third Dimension</title>
</head>
</head>
<body>
<? if ($signup) { ?>
<!-- Begin Validation for First and last name -->
<form method="POST" name="Signup">
<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=-1
?>
<? $action = ("test.php"); ?>
<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 = button value="Sign Up!" onclick="return decidefunc(<? print ("$error"); ?>);">
</form>
<!-- End Validation for Firstname and lastname -->
<?
} else {
?>
<form>
</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>
</body>