access to http session or adding php code

(10 posts) (2 voices)
  1. eugfri, Member

    hi,
    I would like to be able to use http session id in my code but it is not one of the "automatic parameters" like inLogin, inLocale or inUserAgent, and also dbr.html allows to embed only html or javascript into the output and I understand why. I am wondering if there is any way to get a hold of http session (php session_id() ) inside of report stored proc.

    Thank you

  2. myDBR Team, Key Master

    Hi,
    what is the thing you are trying to do? What is the purpose of using session_id()? Usually you would not need to access internals.

    --
    myDBR Team

  3. myDBR Team, Key Master

    Hi,
    what is the thing you are trying to do? What is the purpose of using session_id()? Usually you would not need to access internals.

    --
    myDBR Team

  4. eugfri, Member

    I would like to implement something similar to shopping cart functionality when user performs some actions, data entry across multiple screens etc and its persisted only if user clicks "save" when viewing his "shopping cart" content (all data he has entered across multiple screens). I would be keeping all such data in some staging table first as its entered (with userid + sessoid key) but I want to know how and when to cleanup staging table rows that were not acted on (and permanently saved in non-staging tables) by user during session when they were created and which of the staging rows to save (only the ones created during current session).

    I hope its not a very complicated explanation and it makes sense.
    This is essentially a "shopping cart"-like functionality.

  5. myDBR Team, Key Master

    What is the additional information the session_id would bring to you? You clean the staging table if same user logs in with different session_id?

    --
    myDBR Team

  6. eugfri, Member

    Yes. Exactly.

  7. myDBR Team, Key Master

    Using session_id for this is not a good idea as it might be a security risk. We introduced a session hash instead which will work like a session_id but has no security implications.

    See all automatic parameters in demo.

    --
    myDBR Team

  8. eugfri, Member

    Oh, this is great! It would definitely work as well. Did not see it in documentation anywhere.
    Thank you very much!

  9. myDBR Team, Key Master

    Just make sure you are using the latest build.

    --
    myDBR Team

  10. eugfri, Member

    yep!


Reply

You must log in to post.