blob: 6af935e894b8f267271101de48a27c6219cc0c02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
local cookies = require"cgilua.cookies"
CL_COOKIE = "cgilua_cookie"
local test = cookies.get (CL_COOKIE)
cookies.set (CL_COOKIE, os.date())
cgilua.htmlheader ()
cgilua.put ([[
<h1>Testing Cookies library</h1>
]]..CL_COOKIE..' = '..tostring(test)..[[<br>
Assigning current date to cookie!<br>
Reload this script to check cookie's value!
]])
|