GO URL with Session Variable

I want to use interaction between two reports in different dashboards, which do not share the same tables but the same values.
When clicking on column A values in Report A, I want to create action link with option to open Report B, presenting column B, which is filtered by value A.
I also want the prompts in Report B to present the value A, as it was selected by the user on Report A.
I thought about using GOURL in action link to specific URL. I manage to open Report B, but it is not filtered by A.
How can I transfer the value A in the URL? how should I add the value A into '&val1=XXX'?
I also want to transfer other prompt values (e.g. val2 of col2) from A to B. I set this prompt value to session variable, but how can I add it in the GOURL syntax of '&val2=XXX'?

Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya

Similar Messages

  • Using Double Byte Characters in URL For Session Variables

    When I supply the value for a session variable in the URL for an IRPT page where the value contains double byte characters, Japanese in this case, the characters are corrupted by the time they are entered for the session variables.  Does anyone know a solution to this problem or experience in this area?  Currently using xMII 11.5 SR3.

    Hi Bryan,
    I would suspect that under the covers the session variable is of datatype string.  For double byte characters, it would need to be wstring.  There is a better explanation to be found at:
    Link: [Kanji and Java Datatypes|http://www.unix.com.ua/orelly/java-ent/jenut/ch10_04.htm] or you can try google on  Kanji Datatype  OR Kanji Java Datatype
    It could also be a problem with the operating system which I ran into about 10 years ago, but I would hope that Microsoft had moved beyond that by now.
    Maybe some more technical folks could chime in to confirm or deny my explanation.
    Mike
    Edited by: Michael Appleby on Jul 8, 2008 5:23 PM

  • Purchased ColdFusion 10: Having problem with session variables

    My Dept. has just bought CF10 and I'm finally updating my existing web app to CF10 from CF8. My First Problem with CF10 is using session variables.
    When using the lower version of CF (since CF 4 to 8) I have never had any problem setting up session variables and getting or using these variables in other pages after a successful login but with CF 10 it seems setting session variables and using them in other pages are a major problems. I'm not sure where have I done wrong in the codes.
    First I'm setting the session in my Application.cfc This way:
    <cfcomponent displayname="Application" output="true">
      <cfset THIS.Name ="MyNewApp"/>
      <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,20,0) />
      <cfset THIS.SessionManagement ="YES"/>
      <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 20, 0 ) />
      <cfset THIS.SetClientCookies = false />
    <cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
    <cfset application.Main_DSN = "TESTDB">
    <cfreturn true />
    </cffunction>
    <cffunction name="onApplicationEnd" output="false">
          <cfargument name="applicationScope" required="true">
        </cffunction>
    <cffunction name="OnSessionStart" access="public" returntype="void" output="false" hint="Fires when user session initializes.">
    <cfset session.loggedin = "NO">
    <cfset session.username = "">
    <cfset session.userrights = "">
    <cfset session.usergroup = "">
    </cffunction>
    </cfcomponent>
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>
    In index.cfm, Before Login I got:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    After a successful Login:
    session.loggedin = NO
    session.username = ["empty string"]
    session.userrights = ["empty string"]
    session.usergroup = ["empty string"]
    Have I done something wrong? These codes work on CF8. Please help.
    I need to mentioned:
    CF10 is in Linux and my web app is under https not http. But these session variables should be shared bentween http and https because some older application are still in http.

    On which page is the following code?
    After login, user is validated and set values to those session.variables:
    ........user validation codes here......................
    <cfif mylogin NEQ true>
          <cflocation url="/login/login.cfm">
          <cfabort
    <cfelse>
          <cfset session.loggedin="Yes">
          <cfset session.username="#Trim(Form.username)#">
         <CFSET qUserRights = LoginObj.getUserRights('#Trim(Form.username)#')>
         <cfset session.userrights = qUserRights><!--- it's a query --->
        <CFSET qUserGroup = LoginObj.getUserGroup('#Trim(Form.username)#')>
            <cfloop query="qUserGroup">
               <cfset session.usergroup = user_group>
               <cfbreak>
            </cfloop>
        <!--- ****************** ???????????????????????????????????????????????????????????????????????????
        When I do cfdump in at this level, I can see that all of these session variables have been assigned to their values.
        But these session variables are not accessible from other pages. Other pages still show these session variable without its value.
        So, when I use these cfdumps in the index.cfm it is shown as they're not yet assigned with any values   ****************** --->
       <cfdump var="#session.loggedin#">
       <cfdump var="#session.username#">
       <cfdump var="#session.userright#">
       <cfdump var="#session.usergroup#">
    </cfif>

  • Issue with session variable

    Hi,
    I'm trying to setup a session variable to filter an Answer query based on the user login name. I've created the following
    - A database table that contains a user name and its related filter (Entity)
    - An initialization block for the session variable to issue the following sql: select Entity from table where user_name = ':USER'
    - Created a target session variable called CURR_ENTITY as the target and assign a default value as 'No entity'.
    - Filter my Answer query to use the session variable CURR_ENTITY
    After restart of BI server and Presentation services and opening the report, CURR_ENTITY is always set to the default value. I've checked NQQuery,.log and looks like the initialization block was not returning any rows.
    Any ideas on how to get around this issue? Thanks.
    Regards,
    Gerd

    Hi gerd,
    select Entity from table where user_name = ':USER'Check if this query is returning values in the backend DB.If so it is returning then it should work fine in session variable.
    After defining the target variable CURR_ENTITY and test it in the screen.That shows you is it picking all the values or a single defaulted value.
    If its showing all values then re-check your block once again.
    (OR)
    In the target variable instead of variable define row-wise initialization (i mean check it) and change the SQL in the variable to this
    select 'CURR_ENTITY',Entity from table where user_name = ':USER'
    and test it so you can use it in answers .....it should work with what is required.
    hope answered the question.
    Cheers,
    KK

  • Row level security with session variables, not a best practice?

    Hello,
    We are about to implement row level security in our BI project using OBIEE, and the solution we found most convenient for our requirement was to use session variables with initalization blocks.
    The problem is that this method is listed as a "non best practice" in the Oracle documentation.
    Alternative Security Administration Options - 11g Release 1 (11.1.1)
    (This appendix describes alternative security administration options included for backward compatibility with upgraded systems and are not considered a best practice.)
    Managing Session Variables
    System session variables obtain their values from initialization blocks and are used to authenticate Oracle Business Intelligence users against external sources such as LDAP servers or database tables. Every active BI Server session generates session variables and initializes them. Each session variable instance can be initialized to a different value. For more information about how session variable and initialization blocks are used by Oracle Business Intelligence, see "Using Variables in the Oracle BI Repository" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.
    How confusing... what is the best practice then?
    Thank you for your help.
    Joao Moreira

    authenticating / authorizing part is take care by weblogic and then USER variable initialized and you may use it for any initblocks for security.
    Init block for authenticating / authorizing and session variables are different, i guess you are mixing both.

  • Problem with Session variable initialization block

    Hi,
    I'm getting strange results when using session variables in my repository files.
    I have created session variables as specified in the document which is available at
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html
    The main problem getting with the system session variable (USER) in the select statement.
    My select statement is as follows,
    select ':USER',case when upper(':USER') = 'KUMAR' then 'APR-05' end from Dual
    The problem is while logging into the BI Answers it is allowing all the invalid users to login who does not exist.
    when i remove the quotes and simply use :USER in the select statement it is not allowing the invalid users to login but giving error while displaying the results.
    when i remove the user variable from select statement its giving correct results.
    Can i know what is causing the problem.
    Thanks,
    Kumar.

    Hi DK,
    Check out my post Rowlevel Security?? and see if it helps you.
    Cheers!
    -Joe

  • ADDT Dynamic List with Session Variable?

    I've created a dynamic list using ADDT. When a member logs into the site I want the member to see only his or her specific information in this list. How do I create a session variable that allows only the logged in member to see there specific information in the list?
    <br />
    <br /><%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <br />
    <!--#include file="../Connections/rentalpaypro.asp" -->
    <br />
    <!--#include file="../includes/common/KT_common.asp" -->
    <br />
    <!--#include file="../includes/tfi/TFI.asp" -->
    <br />
    <!--#include file="../includes/tso/TSO.asp" -->
    <br />
    <!--#include file="../includes/nav/NAV.asp" -->
    <br /><%<br />' Filter<br />  Dim tfi_listLandLordRentalProperties3: Set tfi_listLandLordRentalProperties3 = new TFI_TableFilter<br />  tfi_listLandLordRentalProperties3.Init MM_rentalpaypro_STRING, "tfi_listLandLordRentalProperties3"<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.memUserName", "STRING_TYPE", "memUserName", "%"<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.StreeNumber", "NUMERIC_TYPE", "StreeNumber", "="<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.StreetName", "STRING_TYPE", "StreetName", "%"<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.AptNumber", "NUMERIC_TYPE", "AptNumber", "="<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.City", "STRING_TYPE", "City", "%"<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.State", "STRING_TYPE", "State", "%"<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.ZipCode", "NUMERIC_TYPE", "ZipCode", "="<br />  tfi_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.RentAmount", "NUMERIC_TYPE", "RentAmount", "="<br />  tfi_listLandLordRentalProperties3.Execute()<br /><br />' Sorter<br />  Dim tso_listLandLordRentalProperties3: Set tso_listLandLordRentalProperties3 = new TSO_TableSorter<br />  tso_listLandLordRentalProperties3.Init "rslistLandLordRentalProperties3", "tso_listLandLordRentalProperties3"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.memUserName"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.StreeNumber"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.StreetName"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.AptNumber"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.City"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.State"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.ZipCode"<br />  tso_listLandLordRentalProperties3.addColumn "LandLordRentalProperties.RentAmount"<br />  tso_listLandLordRentalProperties3.setDefault "LandLordRentalProperties.memUserName"<br />  tso_listLandLordRentalProperties3.Execute()<br /><br />' Navigation<br />  Dim nav_listLandLordRentalProperties3: Set nav_listLandLordRentalProperties3 = new NAV_Regular<br />  nav_listLandLordRentalProperties3.Init "nav_listLandLordRentalProperties3", "rsLandLordRentalProperties1", "../", Request.ServerVariables("URL"), 10<br />%>
    <br />

    Hi,
    when you use the dynamic list ..
    it creates a SQL query..
    change it ..,
    add the param ( your session variable to it)
    hope this helps
    regards
    mohnkhan
    http://www.mohitech.com

  • Filtering a Recordset with session variable

    Hi
    I am trying to filter a recordset based on a session
    variable. The session variable is passed from the login page via a
    username which is their email address. This has been successful.
    However when I want to filter the users table - tbl_users to
    show their first name it doesn't work.
    I followed the adobe help tutorial plus ahave tried other
    combinations and I am now at a loss on where exactly I am going
    wrong.
    The recordset is rs_UserAccess
    I have a session variable called - MM_Username
    The table has 5 records of various users
    The code that I have fiddling with is -
    <%
    Dim rs_UserAccess
    Dim rs_UserAccess_numRows
    Set rs_UserAccess = Server.CreateObject("ADODB.Recordset")
    rs_UserAccess.ActiveConnection = MM_conn_sidecounter_STRING
    rs_UserAccess.Source = "SELECT * FROM tbl_users WHERE
    username = MM_Username"
    rs_UserAccess.CursorType = 0
    rs_UserAccess.CursorLocation = 2
    rs_UserAccess.LockType = 1
    rs_UserAccess.Open()
    rs_UserAccess_numRows = 0
    %>
    Any help would be appreciated. I have outlined below the
    different combinations I have tested.
    Try No1
    rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE username
    = Session("MM_Username")”
    Message:
    Microsoft VBScript compilation error '800a0401'
    Expected end of statement
    /main.asp, line 182
    Try No2
    rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE username
    = Session(‘MM_Username’)”
    Message:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Undefined function
    'Session' in expression.
    /main.asp, line 186
    Try No3
    rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE username
    = Session(MM_Username)”
    Message:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Undefined function
    'Session' in expression.
    /main.asp, line 186
    Try No4
    rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE username
    = Session Variable MM_Username"
    Message:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in query expression 'username = Session Variable
    MM_Username'.
    /main.asp, line 186
    Try No5
    rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE username
    = MM_Username"
    Message:
    Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
    [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
    Expected 1.
    /main.asp, line 186
    Thanks in advance
    Cheers
    Downsy

    Try this:
    rs_UserAccess.Source = "SELECT * FROM tbl_users WHERE
    username = " & Session("MM_Username")
    Keep that on one line.
    Ken Ford
    Adobe Community Expert
    Fordwebs, LLC
    http://www.fordwebs.com
    "Downsy42" <[email protected]> wrote in
    message news:[email protected]...
    > Hi
    > I am trying to filter a recordset based on a session
    variable. The session
    > variable is passed from the login page via a username
    which is their email
    > address. This has been successful.
    > However when I want to filter the users table -
    tbl_users to show their first
    > name it doesn't work.
    > I followed the adobe help tutorial plus ahave tried
    other combinations and I
    > am now at a loss on where exactly I am going wrong.
    > The recordset is rs_UserAccess
    > I have a session variable called - MM_Username
    > The table has 5 records of various users
    >
    > The code that I have fiddling with is -
    >
    > <%
    > Dim rs_UserAccess
    > Dim rs_UserAccess_numRows
    >
    > Set rs_UserAccess =
    Server.CreateObject("ADODB.Recordset")
    > rs_UserAccess.ActiveConnection =
    MM_conn_sidecounter_STRING
    > rs_UserAccess.Source = "SELECT * FROM tbl_users WHERE
    username = MM_Username"
    > rs_UserAccess.CursorType = 0
    > rs_UserAccess.CursorLocation = 2
    > rs_UserAccess.LockType = 1
    > rs_UserAccess.Open()
    >
    > rs_UserAccess_numRows = 0
    > %>
    >
    >
    >
    > Any help would be appreciated. I have outlined below the
    different
    > combinations I have tested.
    >
    >
    > Try No1
    > rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE
    username =
    > Session("MM_Username")?
    > Message:
    > Microsoft VBScript compilation error '800a0401'
    > Expected end of statement
    > /main.asp, line 182
    >
    > Try No2
    > rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE
    username =
    > Session(?MM_Username?)?
    > Message:
    > Microsoft OLE DB Provider for ODBC Drivers error
    '80040e14'
    > [Microsoft][ODBC Microsoft Access Driver] Undefined
    function 'Session' in
    > expression.
    > /main.asp, line 186
    >
    > Try No3
    > rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE
    username =
    > Session(MM_Username)?
    > Message:
    > Microsoft OLE DB Provider for ODBC Drivers error
    '80040e14'
    > [Microsoft][ODBC Microsoft Access Driver] Undefined
    function 'Session' in
    > expression.
    > /main.asp, line 186
    >
    > Try No4
    > rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE
    username = Session
    > Variable MM_Username"
    > Message:
    > Microsoft OLE DB Provider for ODBC Drivers error
    '80040e14'
    > [Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in
    > query expression 'username = Session Variable
    MM_Username'.
    > /main.asp, line 186
    >
    > Try No5
    > rs_UserAccess.Source ="SELECT * FROM tbl_users WHERE
    username = MM_Username"
    > Message:
    > Microsoft OLE DB Provider for ODBC Drivers error
    '80040e10'
    > [Microsoft][ODBC Microsoft Access Driver] Too few
    parameters. Expected 1.
    > /main.asp, line 186
    >
    > Thanks in advance
    > Cheers
    > Downsy
    >
    >
    >

  • Filter recordset with session variable

    This has never happened to me before, but for some reason, my
    recordset that drives a dynamic table won't filter results based on
    a session variable. I know session variables are working because I
    have the session variable echo on the page (dragged-n-dropped my
    session variable from the Bindings panel to my page), and that
    works fine. So why can't I filter my recordset with the same
    session variable??? What's going on?
    PS: I've attached my result page's code to this
    message.

    Gabe the Animator wrote:
    > <?php require_once('Connections/sales.php'); ?>
    > <?php
    > if (!function_exists("GetSQLValueString")) {
    > function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    > $theNotDefinedValue = "")
    > {
    > $theValue = get_magic_quotes_gpc() ?
    stripslashes($theValue) : $theValue;
    >
    > $theValue = function_exists("mysql_real_escape_string")
    > mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    >
    > switch ($theType) {
    > case "text":
    > $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    > break;
    > case "long":
    > case "int":
    > $theValue = ($theValue != "") ? intval($theValue) :
    "NULL";
    > break;
    > case "double":
    > $theValue = ($theValue != "") ? "'" .
    doubleval($theValue) . "'" :
    > "NULL";
    > break;
    > case "date":
    > $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    > break;
    > case "defined":
    > $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    > break;
    > }
    > return $theValue;
    > }
    > }
    >
    > $colname_rsSales = "-1";
    > if (isset($_SESSION['state'])) {
    > $colname_rsSales = $_SESSION['state'];
    > }
    > mysql_select_db($database_sales, $sales);
    > $query_rsSales = sprintf("SELECT * FROM sales WHERE city
    = %s",
    > GetSQLValueString($colname_rsSales, "text"));
    > $rsSales = mysql_query($query_rsSales, $sales) or
    die(mysql_error());
    > $row_rsSales = mysql_fetch_assoc($rsSales);
    > $totalRows_rsSales = mysql_num_rows($rsSales);
    >
    > session_start(); ?>
    The issue is that PHP doesn't "work" with session values
    until the session has started, and that must be done on each page,
    and must be done in the code *above* any reference to a session
    variable. The code you posted has the session_start() after it
    tries to use the session value ito filter the recordset. So move
    this last line of code ( session_start(); ) above $colnam_rsSales =
    "-1". Better yet, use:
    if(!session_id()){
    session_start();
    To prevent some versions of PHP from generating a
    warning/notice if you've called session_start() on the page already
    and you call it again.
    Danilo Celic
    | Extending Knowledge Daily :
    http://CommunityMX.com/
    | Adobe Community Expert

  • Filtering recordset with session variable

    This has never happened to me before, but for some reason, my
    recordset that drives a dynamic table won't filter results based on
    a session variable. I know session variables are working because I
    have the session variable echo on the page (dragged-n-dropped my
    session variable from the Bindings panel to my page), and that
    works fine. So why can't I filter my recordset with the same
    session variable??? What's going on?
    PS: I've attached my result page's code to this
    message.

    Actually, problem solved. I moved " session_start()" above
    "$colname_rsSales = "-1" ", which did the trick.

  • Help with session variable please - CS5.5 PHP

    Hi all,
    I am needing a little assistance with using a session variable and hope that someone may point me in the right direction.
    I have created a PHP page that uses the Dreamweaver 'User Authentication' feature, and the basics of this works fine, directing a user to the correct pages depending on whether they are or are not a valid user. I would like however to personalise the 'valid user' page with the persons Username as entered in the User Authentication table....a seemingly simple task using a session variable, but one that I just don't seem to be able to get working!
    The code generated for the UA on page 1 is as follows:
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['txtfirst_name'])) {
      $loginUsername=$_POST['txtfirst_name'];
      $password=$_POST['txtsurname'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "member_update.php";
      $MM_redirectLoginFailed = "login.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_panto, $panto);
      $LoginRS__query=sprintf("SELECT firstname, surname FROM web_access WHERE firstname=%s AND surname=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $panto) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
       $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;         
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];   
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    Firstly, the text highlighted in red above appears to be setting the session variable that I require. Is This correct?
    If so, what is the code that I need to place in page 2 to use that session variable? or
    Do I need to do something else on page 1 to properly assign the session variable?
    Would really appreciate your expertise
    Mark

    It looks as though you've set the columns incorrectly in the User Authentication server behavior. This is the SQL query that checks the user's credentials:
      $LoginRS__query=sprintf("SELECT firstname, surname FROM web_access WHERE firstname=%s AND surname=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
    You're looking for firstname and surname, whereas you should be looking for the user's login name and password.
    $_SESSION['MM_Username'] is a session variable that stores the user's login name. To use it in a subsequent page, all that's needed is for the page to begin with session_start(). You can then echo the value to display it.
    If you want to display the person's real name, you need to create a recordset in the second page using $_SESSION['MM_Username'] to find the firstname and surname. Alternatively, you can edit the existing code like this (I've copied only part of it):
      $LoginRS__query=sprintf("SELECT firstname, surname FROM web_access WHERE firstname=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $panto) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        $row = mysql_fetch_assoc($LoginRS);
         $_SESSION['full_name'] = $row['firstname'] . ' ' . $row['surname'];
        if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
        //declare two session variables and assign them
       $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;
    You can then use $_SESSION['full_name'] in a subsequent page that begins with session_start().

  • Problem with session variable

    Hi,
    After I insert a record into my MS Access database, it seems
    to me that the session variable got destroyed so the next page
    display the session variable as undefined. Has anyone have similar
    problem? If so, how to work around that?
    Thanks.
    Tommy,

    neptunes wrote:
    but its leading to jsp page error...For starters: never, never, ignore errors (exceptions and stacktraces). Those contain very, very, worthful information about the cause of the problem and what exactly went wrong. This way you can easily trackback the problem and solve it.
    If you're unable to think logically and smart so that you can interpret the error yourself, if necessary with help of Google, then post it here. Then we'll tell you about the actual problem and possible soltions.
    At any way:
    iam displaying some data in a table using resultset object,now at the same time iam using to session variable to use the resultset object in my other applications...This already doesn't sound very good. You should never pass expensive resources around like that. You should acquire and close the Connection, (Prepared)Statement and ResultSet in the shortest possible scope. Preferably already in the same method as where you query the data.

  • Trouble with session variables

    Hello, I am a user of cf for a number of years, but only
    lately as of last week have I had the opportunity to work with CF
    8.... wow the changes are quite intimidating. But none the less
    press on is my thought, so now my trouble. Thing I did was to start
    using application.cfc vs application.cfm, as it would appear that
    is how things have come to pass. So I looked around and found this
    code to set session management:
    <cfcomponent output="false" hint="Handles application
    level events.">
    <!--- Set up the application. --->
    <cfset THIS.Name = "AppCFC" />
    <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 60,
    0 ) />
    <cfset THIS.SessionManagement = true />
    <cfset THIS.SetClientCookies = false />
    <CFSET request.dsn = "wlaw" />
    </cfcomponent>
    My problem is that while I can define a session variable on a
    page that is not under the SSL cert, my session vars become
    undefined once I land on a page under SSL.
    Am I missing something? I dont recall this being a problem in
    the past. All help is appreciated.
    as to setting the var, it is done on an index page which
    calls another page in a different directory, but under the same
    server,.
    <cfset session.ref="foo">
    the only changes are that the result page or action page if
    you prefer is now under the ssl and the var becomes undefined.
    thank you in advance
    Mike Dooly

    is the object being put in session context serializable.. Also in
              other to avoid any generated classes issues delete all the classes
              whcih weblogic generates as part of deploying the application. That
              should atleast mitigate one explanation for your problem.
              Hope this helps
              ~a
              [email protected] (Gabriel Ornelas De Luna) wrote in message news:<[email protected]>...
              > Hello everyone,
              > I'm currently working with WL 6.1 and I'm having trouble with the
              > persistence of some session variables which are initially created
              > correctly on the server side, and they get lost (null) once the Web
              > clients need to access its value.
              > This is the error which is being written on a log file:
              >
              > <May 13, 2003 3:05:09 PM EDT> <Error> <HTTP Session> <Could not
              > deserialize session data
              > java.io.NotSerializableException:
              >
              > Things were woriking perfectly, but suddenly after bouncing the server
              > instance several times, in order to pick up the latest changes in my
              > classes, I started to get this error once the server tries to load the
              > jsp.
              >
              > JSP Code:
              > <%
              > Integer businessID = (Integer) session.getAttribute("business_id" );
              > Util.isCapitolBusiness(businessID.intValue())
              > %>
              >
              > I appreciate your help.
              > Regards.
              > g.
              

  • Need assistance with session variable

    Hello All, I am new to BIEE product. I have defined an initialization block - called it 'NQ_SESSION' and a session variable 'REVENUE'.
    Then, I created a sample report in Answers where I am attempting to use this variable. At report level, on a amount column I am adding a function
    "Sales Facts".AMOUNT/VALUEOF(NQ_SESSION.REVENUE)
    But the Answers does not return the correct value. Why? Thank you, Sonya

    Please give us more details :
    - what is the request of your init block ?
    - what are the returned results ?
    - can you copy the request generated by OBIEE ? (in the session logs)
    Other question : When you just display the value of the variable, do you have the right value ?

  • Filter view with session variable does not display value properly.

    Hi All,
    I have a very unique issue and I am not sure if anyone ran into this before.
    I have a prompt in my dashboard and a link to a report. The session variable default the value to the current value (term)
    when I click the link to the report I get the following value, on the filter view of the report: Term Code Desc is equal to NQ_SESSION.CSA_Analysis_Term
    however if I click the go button in the prompt I get the value: Term Code Desc is equal to 2030 (2011 Spring)
    does anyone have a solution to this issue
    thanks

    Hello,
    Have the same issue. Any solution. Gurus plz help.
    thanks,
    deep

Maybe you are looking for