Code Sample |
-- break up query string params=" "..string.gsub(os.getenv("QUERY_STRING"),"&"," ").." " function get_param(var) local p=string.gsub(params,".*"..var.."=(.-)%s.*","%1") -- strip any naughty leading path p=string.gsub(p,".*/","") return(p) end var_a=get_param("one") var_b=get_param("two") |
Quote |
Here's an example I have in one of my in-progress cgi scripts |