Click to See Complete Forum and Search --> : Passing field data from forms between html pages....


madman070578
10-25-2005, 06:03 PM
I've created the following HTML page with a form. I am wanting to display the data captured in the form, on the page formcheck1.html.

Is this possible? And can anyone give me any clues on the code required to display the fields on the second page?

Cheers.....


<html>
<head>
<title>Page title</title>
<script language="JavaScript">
<!--
function checkform()
{
if (custform.custname.value=="")
{
alert ("No Data entered for Customer Name");
return false;
}
}

return true;
</script>


</head>
<body MARGINWIDTH='0 MARGINHEIGHT='0' leftmargin='0' topmargin='0'>
<FORM name="custform" action="formcheck1.html" onsubmit="return checkform()" method="post">
<table border='0' cellspacing='0' cellpadding='0' width='100%'>

<tr>
<td>Customer Name</td>
<td><INPUT TYPE='text' size='50' name='custname'></td>
</tr>
<tr>
<td>E mail Address</td>
<td><INPUT TYPE='text' size='50' name='custemail'></td>
</tr>
<tr>
<td>Credit Card Number</td>
<td><INPUT TYPE='text' size='50' name='custccno'></td>
</tr>
<TR>
<TD><input type='SUBMIT' value='click here!!'></TD>
<TD>&nbsp;</TD>
</TR>

</table>
</FORM>

</body>
</html>

Kravvitz
10-25-2005, 06:17 PM
You should use a server-side language, like PHP or ASP, to do that.

tegraphix
10-25-2005, 07:20 PM
Yes, you will definitely want to use a server-side language like PHP (http://www.w3schools.com/php/php_intro.asp) . And if you plan to get customer's credit card numbers like in your sample, you should read up on SSL (Secure Socket Layer) (http://www.whichssl.com/what_is_ssl.html) or see if your web host provides it. Or you could, like alot of people, use PayPal (http://www.paypal.com/) or some other company to process your payments.