tags:

views:

97

answers:

1
function procLogin($user,$pass,$remember){

      global $session, $form;
      $retval = $session->login($user, $pass ,$remember);
      if($retval){
        header("Location: ".$session->referrer);
      echo "comign in";
     return 'yes';


     }else{

      $_SESSION['value_array'] = $_POST;
         $_SESSION['error_array'] = $form->getErrorArray();
         header("Location: ".$session->referrer);
     return 'no'; 

     }

   }

How can i call this in flex, i mean if the session is user i want a different page and session is admin i want a different page.

But how do i get the session value.

A: 

While I'm not sure what you want exactly, ill try.

The session value is stored in a cookie called PHPSESSID.

Here's a small tutorial on how to read and write cookies in Flash

Ólafur Waage