User Session Variable

I'm new in php, I recently created login user name and
password, is works great, and now I want to work on member update
record.
I'm trying to understand how to develop that using session
variable in dreamweaver. I have two pages, the first page login.php
where to login, and then redirect to second page member-profile.php
which is member forms where to retrieve member information from
mysql database using session variable and then update profile into
the database.
Does anyone know where i can learn sample of how to create
update recorde using session variable! or can anyone explain how to
write that in php code!
please.. thanks.
AM

in the prompt for the user region or department, select SQL results for 'show' and 'report defaults' and write something like this:
SELECT field exp FROM ... WHERE Employee.Alias = VALUEOF(NQ_SESSION.USER_ALIAS)
this will give the right level of info and the user won't need to select it from the drop-down value.
generally, when you select SQLresults for show, you get the SELECT and the FROM clause. Just add the WHERE clause and it should run properly.
in the above example, I have assumed region/dept coming Employee dimension

Similar Messages

  • :USER and :GROUP session variables

    Hi,
    Please let me know the purpose of :USER and :GROUP variables. I have gone thru obiee docs but not understand clearly about these session variables.
    regards
    CK

    If you have to display a welcome message in a dashboard page with the user name, you can refer the USER session variable in the request. It will automatically get substituted with the log on name of the user
    Also you can use these variables in Authentication, authorization and data filters.
    Regards,
    Dpka

  • OBIEE 11g Session variables

    Would anyone know who to setup the USER session variables in the RPD for OBIEE 11g?
    The security setup we have is LDAP Authentication & Default authenticators in Weblogic. Is there a way to retrieve this in the RPD or in answers?
    Lastly, would proxy (act as) functionality configuration differ from 10g because of the above?
    Thanks.

    All,
    Use VALUEOF(NQ_SESSION.USER) whether you are in the front end or .RPD, :USER doesn't work anymore. Also, there is no need to wrap the syntax in quotes, if you do, it won't de-reference the variable.
    Thanks,
    Josh
    Edited by: JFuter on Mar 24, 2011 5:16 PM

  • Using HttpHeader to set value for session variables

    Hi,
    We want to set values for 2 session variables (USER and ROLEID) using HttpHeader in obiee 11g. Has anyone tried this? How can we achieve this?
    I found the below note on the forum for setting value for the USER session variable. how can we set the ROLEID session variable also? is it possible to set values for 2 variables?
    for setting the USER session variable,
    You should add this in $BI_HOME/bifoundation/web/display/authenticationschemas.xml:
    <SchemaKeyVariable source="httpHeader" nameInSource="Proxy-Remote-User" forceValue="SSO"/>
    <AuthenticationSchema name="SSO" displayName="Single Sign On" userID="IMPERSONATE" proxyUserID="NQ_SESSION.RUNAS" options="noLogoffUI noLogonUI">
    <RequestVariable source="httpHeader" type="auth" nameInSource="Proxy-Remote-User" biVariableName="IMPERSONATE" options="required"/>
    </AuthenticationSchema>
    Please suggest.
    Thanks.

    I think maybe your SnmpValue type or value is not corrent.
    1.3.6.1.4.1.7064.201.1.200.100.0 is Enum control type
    when I use
    SnmpValue val = new SnmpString("0");
    It doesn't work, but when I use
    SnmpValue val = new SnmpInt(0);
    It works. I think the JDMK should give some warning message when the type is not correct. :)
    The code is following:
    final SnmpVarBindList setList = new SnmpVarBindList(" set varbind list ");
    SnmpOid oid = new SnmpOid("1.3.6.1.4.1.7064.201.1.200.100.0");
    SnmpValue val = new SnmpInt(0);
    SnmpVarBind valueBind = new SnmpVarBind(oid, val);
    setList.addVarBind( valueBind );
    SnmpRequest setRequest = session.snmpSetRequest(null, setList);

  • Using Session Variables for User Login - sometimes they don't persist... what am I doing wrong?

    Hi all,
    I'm running a site that requires user login.  I approached the building of this site as almost a complete newb to CF (and dynamic coding in general), and it's been a great learing experience (with lots of help from you guys).
    However, I guess I never learned the correct way to handle a user login.  It seemed to me that I could just test the user-entered credentials against those stored in a database, then set a session variable containg that user's record number.  Then, not only would I have an easy way of knowing who this user was and therefore what info to serve him, but I could test for the existence of a valid login on every page in the protected folder, by adding this code to my application.cfc in that folder:
    <cfset This.Sessionmanagement=true>
    <cfset This.Sessiontimeout="#createtimespan(0,8,0,0)#">
       <cfif NOT isDefined ("session.username") or NOT isDefined ("session.password") or NOT isDefined ("session.storeID")>
         <cflocation url="../index.cfm" addtoken="no">
       </cfif>
    ...and it goes on to run a query and verify that the session.username and session.password match for the store defined by session.storeID.  If not, all session variables are cleared and it bounces you back to the login page.  When the user clicks Logout, all I do is delete all the session variables.
    This seemed to work great for like a year, but lately I've been getting reports that the login doesn't seem to persist for longer than approx. 20 minutes of inactivity.  You can see I specified session variables to remain active for 8 hours (I know that seems like a drastically long login, but it's what's necessary for this application).  I've only gotten this report from a few people, and I myself can't seem to duplicate it... I've tested an inactive login for 45 minutes now and it held.
    SO:  any reason you can think of why session variables would be spontaneously clearing for some people?  Would having your router reset its IP address invalidate the session or something?  Also, the problem seemed to begin appearing after my host upgraded all their servers to CF9... could there be any relation?
    And on a more general note... did I go about this completely the wrong way to begin with?  If so, what's the standard way to manage a login?
    Lots of questions, I know... thanks very much for any answers or suggestions!
    Joe

    Ian,
    Thanks very much - very helpful information.
    Sounds like passing the tokens in every request is probably the way to go for this.  I don't think it's likely that any users will be sharing links, unless they actually intend for the recipient to see their info anyway.
    Is that all I would have to do, is add the tokens to every path?  Would that guarantee that all the session variables would remain valid until timeout or being cleared?
    Again, thanks, you've been really helpful.
    Joe
    On Jun 23, 2010 4:37 PM, Ian Skinner &lt;[email protected]&gt; wrote:
    Unfortunately this is the nature of HTTP web applications.  There is NO state maintained from HTTP request to request.  This is by design in the HTTP protocol specifications.
    ColdFusion provides two methods to circumvent this limitation.  Each method has limitations and caveats.  They both rely on the passing of tokens between the client and the server with every request.  These tokens can be passed as cookies OR URL (GET) variables.  You are using the cookie method, which is the simpler and most common. You may be experiencing the limitation of this method.  If something happens to the cookies the session can be lost.
    You could pass the (CFID &amp; CFTOKEN) OR JESSIONID tokens through the URL query string with every request.  This requires one to add these values to every link, form action, cflocation or other request path in our application.  ColdFusion provides the session.urltoken variable to make this easier to do.  The tokens will be visible to the user.  Also if the links with an individual token is share with other users, via e-mail, chat, social networks, etc and one of these users utilize the link during the life of a session (8 hours apparently in your case).  Then that user will access the session of the original user.
    Cookie session management is by far the most common choice by CF developers.  If these methods do not meet your needs you would need to go beyond the HTTP limitations of web applications.  One might be able to accomplish this with a Flex|Air|Flash applications that can be configured to use a continuous connection to the server.  Thus not suffer the stateless nature of the normal HTTP request-response cycle.
    I do not know if a router resetting would cause cookies to be discarded or otherwise invalidated.  But I would not think it is beyond the relm of possibilities.

  • How to wash out an AM instance variable at the end of user session (logout)

    We have a need to create AM instance variables to hold some session level data, which is too complex to be held in a transient VO.
    What we observed is that the instance variable is not washed out at the end of the user session (i.e logout).
    I think since the AM instance is not really destroyed but only release back to the pool the instance variable content persists and is carried over to the next session that access the AM instance.
    What method in AM can be overridden to wash out this instance variable.
    At the moment we are resetting it in prepareSession(), but this means that the information is still held till the next session access the AM.
    It would be better to reset it when the AM is released back to the pool.
    Any pointers would be helpful.

    At the moment we are resetting it in prepareSession(), but this means that the information is still held till the next session access the AM.
    Note that prepareSession() is also invoked after AM activation so this can(and probaly will) reset your variable inside existing session.
    If you don't need to keep variable value between AM activations/passivations, you can use userData, for example:
    this.getSession().getUserData().put("someKey", value);
    UserData values are lost after AM passivation (by default).
    If you need to keep UserData variable value for lifetime of user session, then you can override passivateState() and activateState() as in this sample:
    Application State Management
    Dario

  • SESSION VARIABLES : HOW TO TEST FOR MULTIPLE USERS

    I have a username session variable set up on a localhost testing envirnoment.
    This works fine for one user, but when I open another occurence of the browser (or just another tab) to test for multiple users the system overwrites the session variable with the last username input.
    So the question is:
             Why doesn't dreamweaver hold an instance of the session variable for each browser session? and if not what are your suggestions?
    Thanks
    Adam.

    Thanks for that.
    After scouring the internet I found the only way of running 2 instances of firefox  without them sharing the session variables is to create 2 new firefox profiles in windows + set the MOZ_NO_REMOTE environment variable.
    Internet explorer is much easier as it has a 'new session' option in the file menu, but seems to have more trouble displaying tables correctly.
    Hope this helps anyone with a similar problem.

  • System session variable USER

    Hi,
    i have setup-ed the action links and used the USER variable for the EBS secuirty context init block as this
    EBS_RESP_ID
    EBS_RESP_APPL_ID
    EBS_SEC_GROUP_ID
    EBS_RESP_NAME
    EBS_USER_ID
    EBS_EMPLOYEE_ID
    USER
    Now for the sso configuration in the RPD i need to use the USER variable again as per the document (section A.1.1 )http://docs.oracle.com/cd/E14571_01/bi.1111/e10543/legacy.htm#BABFJEJF
    "To set up LDAP authentication:
    Create an LDAP Server as follows:
    Select Manage then Identity in the Oracle BI Administration Tool to launch the Security Manager.
    Select Directory Servers from the left pane in Security Manager.
    Right-click in the right pane in Security Manager and select New LDAP Server. The LDAP Server dialog is displayed.
    Create the LDAP server by completing the fields.
    Create an LDAP initialization block and associate it with an LDAP server. For more information. see "Creating Initialization Blocks" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.
    Define a system variable named *USER* and map the USER variable to an LDAP attribute (uid or sAMAccountName)."
    So how can i use the same user variable and assign it to LDAP init block as well the EBS security context init block.
    can you provide your valuable inputs here.

    Referencing GROUP session variable in initialization blocks for different types of authentication
    http://108obiee.blogspot.com/2009/10/referencing-group-session-variable-in.html
    Users are assigned to multiple groups from external table with semicolons, see example two and three from the post.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Creating filtered view on the physical layer ussing session variable USER

    Hi:
    I´m creating a view on the physical layer, the view needs to be created dynamically. So depending on the user (using the session variable USER) the view is created with the data a particular user is able to see.
    Fisrt I imported the table and changed it´s properties to be created through a "Select Statement" so i don´t needed to change the mapping on the bussiness model layer.
    The consistency check was OK but i´m not able to see data in answers, even using the Administrator user. Have anyone tried to do this? Here is my query.
    Thanks
    A Garcia
    Select * from D_ESTRUCTURA_RH2 where Region_ID
    IN
    select distinct a.REGION_ID from APP_INDPERSONAL_DM.D_ESTRUCTURA_RH2 a
    inner join (
    select distinct b.REGION_ID from APP_INDPERSONAL_DM.D_ESTRUCTURA_RH2 b
    where exists (select 1 from APP_INDPERSONAL_DM.Autorizacion a, usuarios c
    where a.app_id = 1
    and a.usuario_id = c.Usuario_Id
    and UPPER(c.Nombre_Usuario)=UPPER(':USER')
    and a.miembro_id = 'REGION_ID'
    and a.operador = '='
    and (b.REGION_ID = (case when valor = 'Todo' then 0 else valor end) or valor='Todo'))
    ) seguridad
    on
    a. REGION_ID = seguridad.REGION_ID
    )

    whay not use the same filter in the content tab of the logical table source?
    check the physical sql sent to databse using web-admin-manage sessions-view log and see if there is any unexpected behavior. also run the same query in db and see iff you get the results in databse itself.

  • Prevent user from setting a parameter in url. Always use http session variable

    In my xsql page I want to prevent a user from seeing data that he is not allowed to see. I am thinking of implementing this by reading a http session variable (like userid=xxx) to be used in my query. I want to be absolutely sure that the userid variable cannot be set manually by the user, for instance by manipulating the url (like: mypage.xsql?userid=123). How can I do this?

    Sorry guys, already found it. Thanks to a reply from our lead-guru Muench on another post in this forum. Look here for the answer:
    http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88894/adx10xsq.htm#1023490
    Search for "Understanding the Different Kinds of Parameters".

  • Can i use session variable VALUEOF(NQ_SESSION.USER) in write back report?

    Hi All,
    I have created a write back report and successfully inserted records into a table.
    Now i want to capture the user who has inserted in to the table.
    Till now i have given edit option to the users on USERNAME column.
    But now i want to capture the user automatically.
    when i user VALUEOF(NQ_SESSION.USER), i can capture the Logged in user in USERNAME col and the moment i execute the report it is throwing an error.
    What i observed is....
    In the advanced tab USERNAME col is changed to VALUEOF(NQ_SESSION.USER).
    is there any workaround for this?
    Thanks

    >>I have a session variable assigned to the ID#(auto
    number in access db) of messages posted.
    I not sure if I follow your in the description. I would
    assign the Record ID to the session variable.
    Place the Record id in the repeat region.
    Then you could assign that record id to a session variable
    when the button is click, capture the button click event. Then
    redirect to the EMPLOYEEMessageDELETE1.asp page, which will read in
    the session variable (record id) to be deleted.
    David Pearson

  • How to deploy a VO Bind variable to get value from user session....

    Hello everbody...
    A JSF Page has a table based on VO with two parameters. One of this parameters I will pass by operation ExecuteWithParams.
    but the other parameter I need to pass a value from User session.
    Is that possible? How would I do that? I´m using jdev10.1.3
    Thankyou...

    When you created a binding for executeWithParams in your pageDef, the action binding should have had NamedData elements for each of the parameters. These would have been assigned values from a variableIterator up in the executables section. The parameter that gets its value from user input should be left alone. For the parameter that gets its value from the user session, change the EL expression that defines its NDValue attribute so that it references the session information that you want to use. This can be a sessionScope variable that you set earlier in the session, as Frank suggests, a property of a managed bean in session scope, or some other variable.

  • Define User ID Session Variable

    I created a login page to authenticate users. The user enters
    their email and password to login. At login, I would also like to
    select a user id from the same table the email and password are
    stored in. How can I add a session variable for the user id?
    Here is the code created by Dreamweaver:

    Are these functions on the same page? Will you be using this
    variable on
    other pages?
    What you have described should work fine. Can you test it by
    placing -
    <?php echo "user id = " . $_SESSION['User_ID'];exit();
    ?>
    immediately after your assignment code?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "chris.cavage" <[email protected]> wrote in
    message
    news:gipmc7$ifd$[email protected]..
    > After logging into my site, I need to have the User_ID
    from the mysql
    > table be
    > saved as another session variable so I can reference the
    user later.
    >
    > I added this to my page:
    >
    > <?php $_SESSION['User_ID'] =
    $row_Recordset1['User_ID'] ?>
    >
    > My first recordset is table1 (has member information in
    it).
    >
    > I then created a recordset from table2 (has the user_id
    and financial info
    > there): recordset2 filters the field "User_ID" based on
    the session
    > variable,
    > "User_ID".
    >
    > I am then trying to insert information from that
    recordset, but nothing
    > happens.
    >
    > I did start the session at the top of the page. What can
    I do
    > differently?
    >

  • Load more than one user groups to system session variable GROUP from table

    hi, I found that the value of the system session variable GROUP can be assigned by setting a sql in initialization blocks.
    however, if there are some users with more than one user group.
    can this be done by table driven (using sql in initialization blocks) ?
    thanks !!

    Referencing GROUP session variable in initialization blocks for different types of authentication
    http://108obiee.blogspot.com/2009/10/referencing-group-session-variable-in.html
    Users are assigned to multiple groups from external table with semicolons, see example two and three from the post.
    Regards
    Goran
    http://108obiee.blogspot.com

  • Use of session variable to retrieve user language

    Hi,
    I'm converting some ASP code to JSP and I'm having a problem concerning session variables, in ASP I had something like this
    (first.asp)
    <td align="center" width=145px><%=getLabel(1)%>
    and in second.asp
    dim Label(3,2)
    function GetLabel(ndx)
    GetLabel = Label(ndx, Session("Language"))
    end function
    clang_PT = 1 ' Portuguese
    clang_EN = 2 ' English
    Label(0,clang_PT) = "primeira"
    Label(1,clang_PT) = "Segunda"
    Label(0,clang_PT) = "first"
    Label(1,clang_PT) = "second"
    when trying to do the same thing in JSP
    (first.jsp)
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@include file="labels.jsp"%>
    <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    <%if (session.isNew()) {
    session.setAttribute("Language","1");
    }%>
    <%= getLabel(1)%>
    (labels.jsp)
    <%@ page language="java" import="java.util.*"%>
    <%@page pageEncoding="UTF-8"%>
    <%! String getlabel(int ndx){
    return label[ndx][session.getAttribute("Language")];
    String[][] label = new String[2][2];
    %>
    <%
    int clang_PT = 0; // Portugu�s
    int clang_EN = 1; // Ingl�s
    label[0][clang_PT] = "primeira";
    label[1][clang_PT] = "segunda";
    label[0][clang_EN] = "first";
    label[1][clang_EN] = "second";
    %>
    I get
    cannot find symbol symbol : variable session location: class org.apache.jsp.experiencia_jsp return label[ndx][session.getAttribute("Language")];
    ^
    and
    cannot find symbol : method getLabel(int)
    location: class org.apache.jsp.experiencia_jsp
    out.print( getLabel(1));
    Should I use a bean to store this kind of info?
    thanks, V

    right...
    actually, cuz doing this:
    <%!
    String getlabel(int ndx){
    int lang = Integer.parseInt((String)session.getAttribute("Language"));
    return label[ndx][lang];
    %>
    there's no session object... that creates a method in the class separate from the main JSP method. So you need to either pass the session object in, or just pass the attribute value..
    <%!
    String getlabel(int ndx, int lang){
    return label[ndx][lang];
    %>
    int lang = Integer.parseInt((String)session.getAttribute("Language"));
    String lable = getLabel(ndx, lang);

Maybe you are looking for

  • Reversed order of images emailed from LR5 on a Mac

    This has been a problem ever since LR3 and on previous versions of the MacOS. I hoped that it would be fixed in LR5, but not yet. When I select multiple images for email in LR5 on a Mac running Mavericks, the preview shows the images in the correct o

  • My ipad wont charge

    My iPad won't charge. I have tried more than one cable, adapter, and outlet. I have to wiggle the part of the wire where it connects to the actually device and find the perfect position to put the iPad in and now it isn't working

  • How to create an account w/o having to specify object owner_names

    Hi, Do you know how to create an account, that, when logged in wouldn't need to use the following syntax when referring to objects: select * from <owner_name>.<object_name>. When the owner of the account creates an object, then obviously, it's not ne

  • Failed to parse SQL Query - External Tables [Apex 4.0.2]

    Greetings experts - Has anyone encountered errors when creating a report in Apex that sources from an external table within the database? I'm using the 4.0.2 version that is packaged with the 11g XE edition on 64bit CentOS. For example, I might run:

  • [solved] error building fluxbox from PKGBUILD

    I should preface my post with this note:  this is the first time I've run abs, so I may be doing something wrong. After running abs, I went into extra/x11/fluxbox and ran makepkg --asroot It ran through the configure script, but when it started to co