[SOLVED] Are there limits on the amount of data that can be posted via an ASP Form?

This is a discussion on "[SOLVED] Are there limits on the amount of data that can be posted via an ASP Form?" within the Classic ASP section. This forum, and the thread "[SOLVED] Are there limits on the amount of data that can be posted via an ASP Form? are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Oct 23rd, 2007, 17:25
Up'n'Coming Member
Join Date: Aug 2007
Location: Haverhill
Posts: 54
Thanks: 1
Thanked 0 Times in 0 Posts
[SOLVED] Are there limits on the amount of data that can be posted via an ASP Form?

I have been working on a page to make ticket reservations online.

The "customer" completes a simple form that then posts this information to a second page. This second page does two things:
1. Enters this information into a database
2. Sends a confirmation e-mail to the "customer" and to myself
It appeared to be losing some of the posted data when I was carrying out tests on it.

Initially I thought that it might be the e-mailer code that was causing this problem, upon removing it the problem persisted.
I then decided to remove database code incase the problem was related to that code however this has still not resolved the problem.
As such the second page has now become a simple page to display what data has been posted.

You can view the page at www.camjazz.co.uk/reserve2.asp?ID=7 and the page it posts to www.camjazz.co.uk/rev.asp

It only appears to lose the show price, I have been led to believe by other sources that I may be trying to post too much data via the form.

Please can anyone help me to resolve this error.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 24th, 2007, 02:00
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Are there limits on the amount of data that can be posted via an ASP Form?

I don't think the data is lost!

Maybe It's your calculation error! The second page does not get the show price value from the first page. You have to make a asp calculation in your second page in order to get the show price value.

Maybe something like this:

Code: Select all
 Ticket Quantity * 5.00 = show price
Can I see your calculation part on this one? and your second page code as well..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 24th, 2007, 08:18
Up'n'Coming Member
Join Date: Aug 2007
Location: Haverhill
Posts: 54
Thanks: 1
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">&nbsp;</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">&nbsp;</td>
    <td colspan="2" align="left">Please enter the following information to reserve tickets for <%=GigName%>.</td>
  </tr>
  <tr>
   <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
   <td class="boldWithSpace" width="18" align="left">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</td>
    <td align="right">Ticket Type:</td>
    <td align="left"><select name="type">
     <option value="standard">Show Ticket</option>
        <option value="meal">Supper &amp; Show Ticket</option>
        </select></td>
  </tr>
  <tr>
   <td class="boldWithSpace" width="18" align="left">&nbsp;</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">&nbsp;</td>
    <td align="right">&nbsp;</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 &amp; Blues Events.</span></td>
  </tr>
  <tr>
    <td>&nbsp;</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">&nbsp;</td>
   <td>&nbsp;</td>
    <td align="left"><input type="submit" value="SUBMIT" /></td>
  </tr>
     </form>
  <tr>
   <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
   <td class="boldWithSpace" width="18" align="left">&nbsp;</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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 26th, 2007, 02:58
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Are there limits on the amount of data that can be posted via an ASP Form?

Hai Phil,

After looking your code line by line, I notice the typing error occur in line 247 of your code:
HTML: Select all
<input name="" nuts="" value="5.00" type="hidden">
<input name="meal" value="19.50" type="hidden">
I sure what you mean was this:
HTML: Select all
<input name="nuts" value="5.00" type="hidden">
<input name="meal" value="19.50" type="hidden">
Ah haa..! Please let me know the result, ok?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Oct 26th, 2007 at 03:13.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Oct 26th, 2007, 08:34
Up'n'Coming Member
Join Date: Aug 2007
Location: Haverhill
Posts: 54
Thanks: 1
Thanked 0 Times in 0 Posts
Re: Are there limits on the amount of data that can be posted via an ASP Form?

Hi Monie,

You're absolutely correct, thats what was causing the error and here was me looking for something complex to be the reason, I'm a complete idiot.

Directly infront of me I'm going to write in BIG BOLD letters KISS Principle (Keep It Simple Stupid Principle) & Ockham's Razor.
Basically a reminder to keep things simple and the simplest answer/cause is probably the one.


BTW anyone interested can now view the fully functional and working reservations page at www.camjazz.co.uk/reservations.asp the second part is the same URL as before but now has some additional code to prevent posts without all of the necessary data.

Thanks yet again for helping me out monie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Oct 26th, 2007, 08:43
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,611
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Are there limits on the amount of data that can be posted via an ASP Form?

No sweat Phil.

With Great power, comes a Great responsibilities, I would say...
Good luck with your sites..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Creating character and line limits for a form? Inkers JavaScript Forum 8 Jan 11th, 2008 02:10
[SOLVED] Data From Form To Database Input Problems longstand PHP Forum 6 Oct 12th, 2007 15:54
About sending form-data to an email address a.jenery Web Page Design 4 Mar 3rd, 2006 12:17
CGI that lists and sorts form data?? pelachrum Web Page Design 3 Aug 29th, 2005 07:51


All times are GMT. The time now is 05:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42