473,499 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Values not set from login session variables

4 New Member
i know i need to use session logged in user id and do jot know how or the other way is to pull data from feild name balance where logged in user id matches then gets there balance somehow either way i end up back to this problem and do not know how to get around it but it must be setup so that they can only resaults that concern them if this makes sense how is this possible on other sites that might need this?

the loggin should set the var $id with the following

$_SESSION['user_id']= $id;

$_SESSION['user_name'] = $full_name;

$_SESSION['user_level'] = $user_level;

$_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);

$_SESSION['session_name'] = $user_name;

$_SESSION['balance']= $balance;

any ideas why this would not be the case and a way to resolve this?
Oct 14 '11 #1
3 1881
Niheel
2,456 Recognized Expert Moderator Top Contributor
Your code doesn't set the var $id.

Instead it's setting session variable.

To set the variable $id with session data that seems to be set at login. You would do the following:

$id = $_SESSION['user_id'];
Oct 14 '11 #2
jamieduk
4 New Member
@Niheel
you have just made my day and night and you sir deserv a medal it works perfect :d
to see it in action it will be up on jnet2012.0fees.net in about 10 minits lol
Oct 14 '11 #3
jamieduk
4 New Member
after logging in you see 0 showing it works :d
Oct 14 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2237
by: Dave Smithz | last post by:
Hi there, I have implemented a login sequence using session variables for a PHP/MySQL DB which I took over development. I read some books and this NG and it seemed straight forward. However the...
1
2990
by: Gary | last post by:
i have a project which is include ASP, VB, VB COM, MTS, IIS. when the user enter the site the user is asked to login using UserID and Password after that i am passing those values to COM Objects...
1
2766
by: Scott Lyon | last post by:
I'm maintaining (read: I didn't write it, nor do I have the time to spend to rewrite it) an application that is suddenly giving me grief. The reason I say suddenly, is because we're in the...
0
1304
by: Jack | last post by:
Hi, I have the following problem. I have a main data entry form which has a link to a detailed data entry form. The value of the link in the main form is the sum total of all the line items...
3
9390
by: Jessica Loriena | last post by:
I'm trying to write a simple "register form / validate and store in database / show welcome screen" application with ASP.Net. With conventional ASP, I used Session variables and it went something...
8
2280
by: Radu Colceriu | last post by:
HI, I've an asp.net app like this: login.aspx (no frame) :- save in session the user and pass -> framedoc.html :- frameset 2 content 1. menu.aspx...
8
1670
by: Tim W. | last post by:
Chaps. We are working with SQL-Server based Sessions in the following environemtn: Win-Server 2K3 incl. IIS, Dot Net Framework 1.1, SQL2K SP3a, German. We are defining a Session-Variable...
3
3496
by: Lee Moore | last post by:
I have some user controls defined that represent a common header and footer for a particular site. the footer contains links with querystring parameters based on session variables. The problem is,...
3
1765
by: absoft | last post by:
What are the best practices for passing UserId and Password stored in the Session state on the UI layer e.g. ASP.NET Web Forms to the Business Layer or the Data Layer.
3
1328
by: Me | last post by:
I am unable to pass the values using session variables. Here is what I tried thus far - 1. In the 1st program I have created a session variable called name Session.Name= <the value I would like...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.