Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6126191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:20:29+00:00 2026-05-23T16:20:29+00:00

Can the user view data saved in session? For example, if a user log-in

  • 0

Can the user view data saved in session? For example, if a user log-in to a website, and his user_id is saved in session, so that the user stays logged in as long as his id is available in the session. Can he view the session data? If he can view, is it bad?
Sorry if my question sounds stupid, but I have a problem which I’m trying to solve for whole day:

I’m using a flash uploader, when i send the data to another page, the flash uploader loses the data and i am unable to get the data from session, as i asked in my previous question. Since sending session_id is not solving my problem, im thinking to pass the user_id which is stored in session along with the other data, and when the back-end script gets the user_id, it stores it in the session again so that the user stays logged in.
For example, i can send the user_id with javascript (uploadify syntax):

'scriptData'     : {'uid': '<?=$this->session->userdata('uid')?>'},

and on back-end script i can get the user_id by:

$uid = $_REQUEST['sid'];
var_dump($uid);

Now since I am sending the user_id with javascript to the back-end script, the user can very easily see that his user_id is being passed. I have a doubt if its very insecure? Can the user somehow change the user id and send it (and log in as another user?) Is it possible?

The other possible way is to pass the session_id instead of user id (Which I am unable to do it yet), is sending session_id makes more secure than sending user_id?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:20:30+00:00Added an answer on May 23, 2026 at 4:20 pm

    You should never send user_id. That would be a huge security hole in your app, as users will be able to change it to hack into other users account.

    You should send the session_id, and then do this on the server side:

    <?php session_id($_GET['session_id']); ?>
    

    This will start that session.

    And yes, storing data in sessions is secure.

    http://php.net/manual/en/function.session-id.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I work on a web app that involves scheduling. A user can view his
I have a system whereby a user can view categories that they've subscribed to
net website, I would like to add button by which user can view the
I have a view user control that can post form. This control can be
I have a tabled view in a while loop, where a user can view
I have a view where the user can change some settings, its basically a
I have a View where the user can select Basic Configuration and Advanced Configuration
I have an view-based application where the user can do a lot of customization
I am trying to set up a Navigation View where a user can enter
How can I have a view render a partial (user control) from a different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.