OK, I am having no end of trouble here!
I have a form with fields in it
Surname
Firstname
email
Phone
I want to have the user fill in the form. When he clicks on the submit button, it takes hiome to a confirmation page with the data he just filled out the form with.
I've tried using session variables but they do not seem to be carrying across. Here is the code for the form on page one
in page two, I thought I could just call the sessions, ie {Session.firstname}
can anybody tell what i'm doing wrong and how I can get the data across to the second page.
-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
I have a form with fields in it
Surname
Firstname
Phone
I want to have the user fill in the form. When he clicks on the submit button, it takes hiome to a confirmation page with the data he just filled out the form with.
I've tried using session variables but they do not seem to be carrying across. Here is the code for the form on page one
Code:
<form action="Breakfastconfirn.asp" method="post" enctype="multipart/form-data" name="regForm" id="regForm">
<table width="393" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="190" align="right" bgcolor="#CCCCCC" class="Arial12_5">Surname</td>
<td width="200" bgcolor="#CCCCCC"><input name="txtSurname" type="text" class="Arial12" id="txtSurname" size="40"></td>
<%Session("surname")=Request.Form("txtSurname")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">First Name </td>
<td bgcolor="#CCCCCC"><input name="txtFirstName" type="text" class="Arial12" id="txtFirstName" size="40"></td>
<%Session("firstname")=Request.Form("txtFirstName")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Email</td>
<td bgcolor="#CCCCCC"><input name="txtEmail" type="text" class="Arial12" id="txtEmail" size="40"></td>
<%Session("txtemail")=Request.Form("txtEmail")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Phone</td>
<td bgcolor="#CCCCCC"><input name="txtPh" type="text" class="Arial12" id="txtPh" size="40"></td>
<%Session("phone")=Request.Form("txtPh")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Cost</td>
<td bgcolor="#CCCCCC" class="Menutxt">$
<input name="txtcost" type="text" class="Arial12" id="txtcost" value="<%=(Breakfast.Fields.Item("Cost").Value)%>" size="10" readonly></td>
<%Session("cost")=Request.Form("txtcost")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Card Type </td>
<td bgcolor="#CCCCCC"><select name="SelCardType" id="SelCardType">
<option value="MasterCard">MasterCard</option>
<option value="Visa">Visa</option>
<option value="BankCard">BankCard</option>
</select></td><%Session("cardtype")=Request.Form("SelCardType")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Card No. </td>
<td bgcolor="#CCCCCC"><input name="txtCardNo" type="text" class="Arial12" id="txtCardNo" size="40"></td><%Session("cardNo")=Request.Form("txtCardNo")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Name on Card </td>
<td bgcolor="#CCCCCC"><input name="txtCardName" type="text" class="Arial12" id="txtCardName" size="40"></td><%Session("cardname")=Request.Form("txtCardName")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Expiry</td>
<td bgcolor="#CCCCCC"><select name="SelMonth" id="SelMonth">
<option value="Jan">Jan</option>
<option value="Feb">Feb</option>
<option value="Mar">Mar</option>
<option value="Apr">Apr</option>
<option value="May">May</option>
<option value="Jun">Jun</option>
<option value="Jul">Jul</option>
<option value="Aug">Aug</option>
<option value="Sep">Sep</option>
<option value="Oct">Oct</option>
<option value="Nov">Nov</option>
<option value="Dec">Dec</option>
</select>
<select name="SelYear" id="SelYear">
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
</select></td>
<%Session("expmonth")=Request.Form("SelMonth")%>
<%Session("expyear")=Request.Form("SelYear")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Code</td>
<td bgcolor="#CCCCCC"><input name="CardCode" type="text" class="Arial12" id="CardCode" size="10"></td><%Session("cardcode")=Request.Form("CardCode")%>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="Arial12_5">Subscribe me to the XLR8 Men's newsletter </td>
<td bgcolor="#CCCCCC"><input name="chkSubscribe" type="checkbox" id="chkSubscribe" value="Please Subscribe Me"></td>
<%Session("subscribe")=Request.Form("chkSubscribe")%>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#CCCCCC"><label>
<input type="submit" name="btnConfirm" id="btnConfirm" value="confirm">
</label></td>
</tr>
</table>
</form>
in page two, I thought I could just call the sessions, ie {Session.firstname}
can anybody tell what i'm doing wrong and how I can get the data across to the second page.
-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."