Q:

Session not starting when using www

I have a strange problem here.
I am using a directory script running off PHP.
The users have the option to type in their postcode so the directory can use their postcode to find local businesses.
I am using a session to save their postcode.
The problem is when the session postcode ($_SESSION['postcode']) doesn't show when I leave out the "www." in the domain. How can I set it so the postcode will show with/without the www.?
Thanks
Peter

A:

session_set_cookie_params(0, '/', '.domain.com');

