Posted by Chris White on 04/30/05 10:47
Daniel Castro wrote:
> "Ken Robinson" <kenrbnsn@rbnsn.com> wrote in message news:<1114177605.028006.62050@o13g2000cwo.googlegroups.com>...
>
>>Daniel Castro wrote (in part):
>>
>>>The code is :
>>>session_start();
>>>// *** Validate request to log in to this site.
>>>$FF_LoginAction = $_SERVER['PHP_SELF'];
>>>if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']!="")
>>>$FF_LoginAction .= "?".$_SERVER['QUERY_STRING'];
>>>if (isset($_POST['login'])) {
>>> $FF_valUsername=$_POST['login'];
>>> $FF_valPassword=$_POST['senha'];
>>> $FF_fldUserAuthorization="";
>>> $FF_redirectLoginSuccess="principal.php";
>>> $FF_redirectLoginFailed="erro_login.php";
>>> $FF_rsUser_Source="SELECT usu_login, usu_senha ";
>>> if ($FF_fldUserAuthorization != "") $FF_rsUser_Source .= "," .
>>>$FF_fldUserAuthorization;
>>> $FF_rsUser_Source .= " FROM usuario WHERE usu_login='" .
>>>$FF_valUsername . "' AND usu_senha='" . $FF_valPassword . "'";
>>> $FF_rsUser=pg_query($wmed,$FF_rsUser_Source) or
>>>die(pg_result_error());
>>> $row_FF_rsUser = pg_fetch_assoc($FF_rsUser);
>>> if(pg_num_rows($FF_rsUser) > 0) {
>>> // username and password match - this is a valid user
>>> $_SESSION['$MM_Username']=$FF_valUsername;
>>> // echo $_SESSION['$MM_Username'];
>>> // session_register("MM_Username");
>>> if ($FF_fldUserAuthorization != "") {
>>>
>>
>>$_SESSION['$MM_UserAuthorization']=$row_FF_rsUser[$FF_fldUserAuthorization];
>>
>>> } else {
>>> $_SESSION['$MM_UserAuthorization']="";
>>> }
As ken stated, you'll want to get rid of the $'s in your $_SESSION
indice. ie. change $_SESSION['$MM_UserAuthorization'] to
$_SESSION['MM_UserAuthorization']. That really should do it.
[Back to original message]
|