
Oct 24th, 2007, 08:18
|
|
Junior Member
|
|
Join Date: Aug 2007
Location: Haverhill
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
Re: Are there limits on the amount of data that can be posted via an ASP Form?
Sure but at the present the second page ( www.camjazz.co.uk/rev.asp) does not make any calculations It just displays the data posted to it.
- HTML: Select all
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<%
Dim Title, Firstname, Surname, Email, Tel, Mobile, TType, Tickets, Mailing, Posted, Gig, ShowCost, MealCost
Set Title= Request.Form("tit")
Set Firstname= Request.Form("first")
Set Surname= Request.Form("sur")
Set Email= Request.Form("email")
Set Tel= Request.Form("tel")
Set Mobile= Request.Form("mob")
Set TType= Request.Form("type")
Set Tickets= Request.Form("qty")
Set Mailing= Request.Form("mail")
Set ShowCost = Request.Form("nuts")
Set MealCost = Request.Form("meal")
%>
<br />
Title = <%=Title%><br />
Firstname = <%=Firstname%><br />
Surname = <%=Surname%><br />
Email = <%=Email%><br />
Tel = <%=Tel%><br />
Mobile = <%=Mobile%><br />
Type = <%=TType%><br />
Qty = <%=Tickets%><br />
Mailing = <%=Mailing%><br />
Showcost(unformatted) = <%=ShowCost%><br />
<%ShowCost = FormatNumber(ShowCost, 2)%>
Showcost(formatted) = <%=ShowCost%><br />
Mealcost(unformatted) = <%=MealCost%><br />
<%MealCost = FormatNumber(MealCost, 2)%>
Mealcost(formatted) = <%=MealCost%><br />
<br />
This data was orignally posted by the form to this page.<br />
However incase I was attempting to post too much data I removed them from the form.<br />
<br />
Gig ID is now posted as a QueryString Variable<br />
<%Gig = Request.QueryString("ID")%>
Gig ID = <%=Gig%><br />
Posted is now calculated by this page rather than the Posting form.<br />
<%Function MediumDate (str)
Dim aDay
Dim aMonth
Dim aYear
aDay = Day(str)
aMonth = Monthname(Month(str),True)
aYear = Year(str)
MediumDate = aDay & "-" & aMonth & "-" & aYear
End Function
Posted = date()
Posted = MediumDate(Posted)%>
Posted = <%=Posted%>
</body>
</html>
Also here is the code for the form from www.camjazz.co.uk/reserve2.asp?ID=7
- HTML: Select all
<table width="430" border="0" cellspacing="2" cellpadding="0">
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td colspan="2" align="left"><span class="LargeTitlePaleGreen"><span class="PaleBlue"><strong><%=GigName%></strong></span></span></td>
</tr>
<form action="rev2.asp?ID=<%=GID%>" method="post">
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td colspan="2" align="left">Please enter the following information to reserve tickets for <%=GigName%>.</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td width="90" align="right">Title:</td>
<td width="330" align="left"><select name="tit">
<option value="">Please Select</option>
<option value="Mr">Mr</option>
<option value="Miss">Miss</option>
<option value="Mrs">Mrs</option>
<option value="Ms">Ms</option>
<option value="Dr">Dr</option>
</select>
</td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">Firstname:</td>
<td align="left"><input type="text" id="first" name="first" size="40" maxlength="100" /></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">Surname:</td>
<td align="left"><input type="text" id="sur" name="sur" size="40" maxlength="100" /></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">E-mail:</td>
<td align="left"><input type="text" id="email" name="email" size="40" maxlength="100" /></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">Tel:</td>
<td align="left"><input type="text" id="tel" name="tel" size="15" maxlength="20" /></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">Mobile:</td>
<td align="left"><input type="text" id="mob" name="mob" size="15" maxlength="20" /></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">Ticket Type:</td>
<td align="left"><select name="type">
<option value="standard">Show Ticket</option>
<option value="meal">Supper & Show Ticket</option>
</select></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right">Ticket Qty:</td>
<td align="left"><select name="qty">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select></td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td align="right"> </td>
<td align="left"><input type="checkbox" name="mail" checked="checked" />
<span class="copyright">Please uncheck if you do not want to be contacted about future Cambridge Jazz & Blues Events.</span></td>
</tr>
<tr>
<td> </td>
<td colspan="2">
<%
Dim dummy99
dummy99 = show
%><%=dummy99%>
<input type="hidden" name"nuts" value="<%=dummy99%>" />
<input type="hidden" name="meal" value="<%=meal%>" />
</td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td> </td>
<td align="left"><input type="submit" value="SUBMIT" /></td>
</tr>
</form>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td class="boldWithSpace" width="18" align="left"> </td>
<td colspan="2" align="left">
<% if show = 0 then%>
The Show tickets cost £<%=show%> courtesy of <strong>Becks Vier</strong>
<% else %>
The Show tickets cost £<%=show%>
<% end if %>
<br />
The Supper tickets cost £<%=meal%> each and entitle you to a special two course supper before the show.<br /> This service is to reserve tickets, you will be contacted to confirm your reservations.</td>
</tr>
</table>
|