I've inherited a bit of code that is used to integrate with a third party (Highrise CRM). I'm a bit rusty on this side of PHP, so was looking for some help.

I want to assign a session variable within a class. At the moment I have the following code:

```
var $highrise_url = 'https://example.highrisehq.com';
var $api_token = 'foofoofoofoofoofoofoofoo';
var $task_assignee_user_id = 'foofoo';

```

But I want the URL, token and ID to be set based on the session valuables I pull from the database of the user who is logged in i.e.

```
$_SESSION['hrurl']
$_SESSION['hrapi']
$_SESSION['hrid']

```

The class uses the variables set above in functions like:

```
$curl = curl_init($this->highrise_url.'/deals.xml');

```

I know that I CAN'T set a variable in a class like this:

```
var $highrise_url = $_SESSION['hrurl'];

```

So how do I do it?

I believe it's done by using the construct function, but I'm shaky at best, so would appreciate help :o)

Many thanks,

Gregor