# Flash and PHP sessions

**URL:** <https://forum.kirupa.com/t/flash-and-php-sessions/107386>\
**Category:** Uncategorized\
**Created:** [April 14, 2004, 9:31pm UTC](https://forum.kirupa.com/t/flash-and-php-sessions/107386 "2004-04-14T21:31:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![btgon](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@btgon](https://forum.kirupa.com/u/btgon)\
**Post date:** [April 14, 2004, 9:31pm UTC](https://forum.kirupa.com/t/flash-and-php-sessions/107386/1 "2004-04-14T21:31:20Z")

</div>

Hi all. I am a little new to flash and designing a flash menu for a project. The site is written in PHP and the Flash menu will just be at the top of the page. Thanks to the tutorial I know there is a way to place login fields in the Flash menu, but I was wondering if Flash can then assign " $\_SESSION[‘user’] " a variable that can be read by the main PHP page.

I created a quick Flash movie that connects to a PHP service that does this :

> function getLogin() {

```
$user = "btgon";

$_SESSION['user'] = $user ;

$myresult = $_SESSION['user'];

return trim($myresult);

```

}

The Flash movie displays “btgon” so I know session user is created, but when I insert the Flash movie in a PHP file, it doesn’t see the session user at all. I am sure someone has tried this before, any help would be greatly appreciated!
