Setting session variable

I like to set a session variable.

The following code is one of trials for it. but it doesn’t work as I expected.

set session name=mySession value=1;

How can I set a session variable correctly?

I doubt you’re going to get any replies to this because you’ve obviously avoided using your Google Foo.

Okay, I set a session with the code below

<!doctype html>
    <meta charset="UTF-8">
$_SESSION['mySession'] = 11;
echo $_SESSION['mySession']

Did I set a session and output the value correctly with the code above?

as they say in the classics:

“Let :google: be your friend and rtfm (read the fine manual)”

session variables