Content of writecookies.html

<html>
<script type="text/javascript">
//this writes a session cookie
document.cookie = "username=Rick";
//this writes a cookie that expires after 3600 seconds
document.cookie = "cookietest=This is cookie 2;max-age=3600";

</script>
Ready.
</html>


Content of readcookies.lc

<?lc
put $_cookie into tArray
put the keys of tArray into tKeys
repeat for each line tkey in tKeys
put tkey &" = "& $_cookie[tkey] &"<br>"
end repeat

?>