473,564 Members | 2,730 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_AGEN T'] = md5($_SERVER['HTTP_USER_AGEN T']);

$_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 1893
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
2251
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 website I have taken over uses two frames. The left hand side is always a navigation frame with the righthand side of the screen always being the...
1
2993
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 and those COM objects are setting the Session values through ASP intransic objects., if the user is a valid user then i am taking out his personal...
1
2769
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 process of transitioning the server on which it runs from Microsoft Windows 2000 Server, to 2003 server (going from IIS 5 to IIS 6). This problem hasn't...
0
1314
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 in the detailed form. The detailed form has fields to capture the individual line items like contracted service expense, travel expense etc. I am...
3
9402
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 like this: ***** form.asp - <form action="ValidateAndStore.asp" method="post">
8
2281
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 2.docviewver.aspx
8
1681
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 named keyword inside asp.net website. At the end of the Website we are writing this variable again to test if the value still exists to the...
3
3505
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, I cannot access the session variables within my user control. The user controls work perfectly otherwise. Example code included.
3
1771
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
1333
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 to pass> 2. In the next program how do I use it? I tried a few things but it doesn't work.
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...

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.