You are here: PHP and Flash Remoting « PHP « IT news, forums, messages
PHP and Flash Remoting

Posted by Yaswanth Narvaneni on 12/05/05 16:19

Hi!

I am using amfchat from tufat.com, and wanted to integrate it with my
site's session data. amfchat uses flash remoting to communicate to the
server.

It initally sends

sessionid=time() to gateway.php

gateway.php starts a session using:

function session($name=false){
if($name){
$prev_name = session_name();
if($prev_name != $name){
session_name($name);
}
}
@session_start();
}

And accesses the session variables in another function thats called
using flash remoting.
as $_SESSION['username'];


I wanted to replace all this and I have made gateway.php start a
session as follows:
$prev_name = session_name();
session_start();

But I am not able to access my session variables in the functions
using $_SESSION['login']

This is the function I have modified:

$session_name = session_name();
session_start();
$username=$_SESSION['login'];
$password=$_SESSION['passwd'];

$result['description'] = "User= $username, Password: $password,
Session: $session_name"

When flash prints the 'result' arrary, the output for description is as follows

User= , Password: , Session: PHPSESSID

Can any one tell me if I am making a mistake some where or give me a solution?

Regards,
Yaswanth

--
"In theory there is no difference between theory and practice.
In practice there is." -- Fortune Cookie

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация