Thread: overflow?
View Single Post
Old 08-02-2002, 10:28 PM   PM User | #8
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
This is the page I made up and it appears to work. I added some validation in because without it, if one of the variables is empty it errors out.

Code:
<HEAD>
<TITLE>Fence post calculator</TITLE>
</HEAD>

<BODY>

<p>
<FORM action="" Method="Post">
Spacing between posts:<INPUT type="text" name="fPostSp"><BR>
Ammount of paces:<INPUT type="text" name="fPaceAm"><BR>
Size of paces:<INPUT type="text" name="fPaceSz"><BR><BR>

<INPUT type="Submit" value="Calculate">
</FORM>
</p>

<%
dim PostNo  'The variable for the number of posts
dim PostSp  'The variable for spacing between posts
dim PaceAm 'The variable for the amount of paces
dim PaceSz  'The variable for the size of the paces

PostSp  = Request.Form("fPostSp")
PaceAm = Request.Form("fPaceAm")
PaceSz  = Request.Form("fPaceSz")

If PostSP > 0 And PaceAm > 0 And PaceSz > 0 Then

PostNo = PaceAm*PaceSz
PostNo=PostNo/PostSp
%>

<p><%=PostNo%> required posts.</p>
<%End If%>

</BODY>
__________________
OracleGuy

Last edited by oracleguy; 08-03-2002 at 12:44 AM..
oracleguy is offline   Reply With Quote