|
Passing Data with Sessions
by Darren Gorvett (darren.gorvett@raidnet.co.uk)
ASP sessions are another way to pass the data.
surveypage1s.asp asks the
user the first questions:
filename=/learn/test/surveypage1s.asp
<html>
<head>
<TITLE>surveypage1s.asp</TITLE>
</head>
<body bgcolor="#FFFFFF">
<form action="surveypage2s.asp" method="post" id=form1 name=form1>
First Name<br>
<input type="text" name="first" size="20"><br>
Last Name<br>
<input type="text" name="last" size="20">
<p>
<input type="submit" value="Next Question ->"></p>
</form>
</body>
</html>
surveypage2s.asp asks the
user the next questions:
filename=/learn/test/surveypage2s.asp
<html>
<head>
<TITLE>surveypage2s.asp</TITLE>
</head>
<body bgcolor="#FFFFFF">
<form action="surveypage3s.asp" method="post" id=form1 name=form1>
<%
session("first")=request.form("first")
session("last")=request.form("last")
%>
Hair Color<br>
<input type="text" name="haircolor" size="20"><br>
Favorite Color<br>
<input type="text" name="favoritecolor" size="20">
<p>
<input type="submit" value="Next Question ->"></p>
</form>
</body>
</html>
surveypage3s.asp asks the
user yet some more questions:
filename=/learn/test/surveypage3s.asp
<html>
<head>
<TITLE>surveypage3s.asp</TITLE>
</head>
<body bgcolor="#FFFFFF">
<%
session("haircolor")=request.form("haircolor")
session("favoritecolor")=request.form("favoritecolor")
%>
<form action="surveypage3srespond.asp" method="post" id=form1 name=form1>
Street Address<br>
<input type="text" name="street" size="20">
<br>
City<br>
<input type="text" name="city" size="20"><br>
State<br>
<input type="text" name="state" size="20">
<br>
Zip<br>
<input type="text" name="zip" size="20">
<br>
<input type="submit" value="Final Step ->" id=submit1 name=submit1>
</form>
</html
</body>
surveypage3srespond.asp gathers
all the answers and responds:
filename=/learn/test/surveypage3respond.asp
<html><head>
<TITLE>surveypage3respond.asp</TITLE>
</head>
<body bgcolor="#FFFFFF">
<%
first=request.form("first")
last=request.form("last")
haircolor=request.form("haircolor")
favoritecolor=request.form("favoritecolor")
street=request.form("street")
city=request.form("city")
state=request.form("state")
zip=request.form("zip")
%>
Thanks for all your information<br>
We are happy to meet you <%=first%> <%=last%><br>
We know your hair color is <%=haircolor%><br>
and your favorite color is <%=favoritecolor%><br>
and we will ship all items to<br>
<%=first%> <%=last%><br>
<%=street%><br>
<%=city%> <%=state%> <%=zip%>
</body></html>
 |  |  |
 |
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too.
a $5 tip buys him lunch at McDonalds,
a $20 tip buys his kid Hitoshi a new computer game,
a $39 tip buys his daughter Michiko a few nice outfits.
See our donor list.
|  |
 |  |  |
|
|
|
|