attribute()is a function. You can't assign a value to a function result.
session_idis a string. The 2nd argument of
request_var()needs to be
0as 2nd argument, it casts the return value to an integer. I guess in your test scenario, the session ID happened to start with 4 digits. Pass the empty string and
$ckswill contain the full session ID.