MBA 683 E-Business Technology --

cookie.adp
Home    Site Map    Search    EhrlichOrg.com

Syllabus    Classes    References  Examples  Student Info    Guest Info

 

<html>
<head>
<title>Cookie Display</title>
</head>
<body>
It is now <%= [ns_fmttime [ns_time] "%A, %B %e, %Y at %r" ] %><p><hr><p>
<%
set headers [ns_conn headers]
set cookies [get_cookie_set]
set csize [ns_set size $cookies]
ns_adp_puts "cookies includes $csize items<p>
<table border><tr><th>&nbsp;N&nbsp;</th><th>name</th><th>value</th></tr>"
set index 0
while {$index<$csize } {
  ns_adp_puts "<tr><td>$index</td><td>[ns_set key $cookies $index]</td>
    <td>[ns_set value $cookies $index]</td></tr>"
  incr index
}
ns_adp_puts "</table>"
set usf_c_name "usf"
ns_adp_puts "The value of $usf_c_name is [ad_get_cookie $usf_c_name n/a]"
%>
<form method=get action="cookie-1.adp">
Cookie Name: <input type=text name=cname size=20>
Cookie Value: <input type=text name=cvalue size=20>
<input type=submit value="Set Cookie">
</form>
<hr></body></html>

 

 

© 2001 by Chuck Ehrlich, all rights reserved.  Comments to webmaster.  Updated on October 10, 2000.