This is beyond both making sense and my control. That being said here is my dilema. I need to have two separate forms, each using a different PHP script that I cannot modify to process them. I need to have both of these forms share the same submit button. Here is a simplified version of the html. Form 1
<div id="formOne>
<form name="returning" method="post" action="PHPscript1.php">
<label>Are you a returning user?</label>
<input type="text" name="retUser" id="retUser" />
</form>
</div>
<div id="formTwo">
<form name="newUser" method="post" action="PHPscript2.php">
<label>Are you a new user, register here</label>
<label>First Name</label>
<input type="text" name="fname" id="fname" />
<label>Last Name</label>
<input type="text" name="lname" id="lname" />
<label>Email</label>
<input type="text" name="email1" id="email1" />
</form>
</div>
<div id="submitContain">
<input type="submit" id="sbtBtn" value="submmit" />
</div>
I think I could possibly switch the submit script by checking the input's value?
$("#sbtBtn").click(function() {
if($("#retUser").val().is('') {
do something;
} else if .....
});
I will also need simple validation on these and know Ill have to do all this via jQuery's AJAX function. Any advice is much appreciated. I don't sign the checks at work, so this is how it is.
thanks in advance!