# Passing sessions

**URL:** <https://forum.kirupa.com/t/passing-sessions/304298>\
**Category:** programming\
**Created:** [February 5, 2010, 2:05am UTC](https://forum.kirupa.com/t/passing-sessions/304298 "2010-02-05T02:05:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drummer392](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@drummer392](https://forum.kirupa.com/u/drummer392)\
**Post date:** [February 5, 2010, 2:05am UTC](https://forum.kirupa.com/t/passing-sessions/304298/1 "2010-02-05T02:05:17Z")

</div>

Hey Guys,

I am having problems getting a session to pass from the login page to the actual CMS.

- I am using PHP5
- I am using [1and1.com](http://1and1.com) hosting services
- I have done 2 other CMS’s with no problem until this 3rd one.

Here is the creation of the session on the login page:

```php

session_start();
$_SESSION['username2009'] = $myusername;

```

Here is what tries to find that session on the second page:

```php
session_start();
if(!$_SESSION['username2009']){
	echo "Wrong";
    exit();
}

```
