LukaszR1
Fully Optimized
- Messages
- 2,833
Hey there, i need help regarding Cookies using .ASP pages.
So what i am required to do is this, I need to be able to read the cookie and place the values from the cookie into the web page textboxes so they are displayed when the page is opened.
Here is the code i have up to now;
Now, my cookie is called "Log". How do i view the cookies content? Also, when i visit the .asp page in my web browser, and input all the fields...and choose to save the log in info...when i reload the page..its all there except for the address field. Could someone double check my coding please.
Any help would be appreciated. Thanks.
So what i am required to do is this, I need to be able to read the cookie and place the values from the cookie into the web page textboxes so they are displayed when the page is opened.
Here is the code i have up to now;
<%
Response.Cookies("Log")
Response.Cookies("Log").Expires=DATE() + 5
'setup some variables
Dim UserName, Password, Address
'read a cookie file. First the User Name
UserName=Request.Cookies("UserName")
'Next the Password
Password=Request.Cookies("Password")
'Next the Address
Address=Request.Cookies("Address")
%>
<html>
<head>
<title>Accounts</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<h4 align="center"><font face="Arial, Helvetica, sans-serif" size="5"><b><font color="#990000">Accounts
</font></b></font><font face="Arial, Helvetica, sans-serif"><br>
Client Accounts</font></h4>
<form method="post" action="">
<table width="96%" border="0" align="center">
<tr>
<td width="37%">User Name :</td>
<td width="63%">
<input type="text" name="txtname" size="40">
</td>
</tr>
<tr>
<td width="37%">Password:</td>
<td width="63%">
<input type="password" name="txtpassword">
</td>
</tr>
<tr>
</tr>
<tr>
<td width="37%">Address:</td>
<td width="63%">
<input type="text" name="txtaddress">
</td>
</tr>
<tr>
<td width="37%">Â </td>
<td width="63%">
<input type="submit" name="Submit" value="Save Data">
</td>
</tr>
<tr>
<td width="37%">Â </td>
<td width="63%">Â </td>
</tr>
</table>
</form>
<h4 align="center"><font size="1" face="Arial, Helvetica, sans-serif">Please show the lab assistant when completed
</body>
</html>
Now, my cookie is called "Log". How do i view the cookies content? Also, when i visit the .asp page in my web browser, and input all the fields...and choose to save the log in info...when i reload the page..its all there except for the address field. Could someone double check my coding please.
Any help would be appreciated. Thanks.