You are on page 1of 3

COOKIES.

asp

<html>

<body>

<%

dim num

num=Request.Cookies("num")

if num="" then

Response.Cookies("num")=1

Response.Write("welcome this is first time")

else

Response.Write("welcome again")

Response.Cookies("num")=num+1

Response.write(" u have visited "&num)

end if

%>

</body>

</html>

FORM.asp

<html>

<body>

<form action=”retrieve.asp” method=”post”>

<table cellspacing=”0”>

<tr>

<td>

NAME:

</td>

<td>
<input type=”text” name=”t1”>

</td>

</tr>

<tr>

<td>

AGE:

</td>

<td>

<input type=”text” name=”t2”>

</td>

</tr>

<tr>

<td>

<input type=”submit” name=s1 value=”SUBMIT”>

</td>

</tr>

</table>

</form>

</body>

</html>

RETRIEVE.asp

<html>

<body>

<%

dim name,age

name=Request.Form("t1")

age=Request.Form("t2")
Response.Write("The name is:"&name&"<br/>")

Response.Write("The age is:"&age)

%>

</body>

</html>

You might also like