473,748 Members | 8,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can’t send cache limit cheaker and problem in back button session variable still dis

20 New Member
HI everyone

1. As user enter username and password in sign-in-form.php then values are collected in sign-in-action-form.php page and the i am storing username into session variable like this In database i have a table named employee

Expand|Select|Wrap|Line Numbers
  1. <a href="logout_file.php">Sign Out</a>
  2. if (username and passwords are matched)
  3. {
  4. session_start();
  5. $_SESSION['employee']['id'] = $row['User_Id'];
  6. $_SESSION['employee']['username'] =$row['Username'];
  7. }
  8. then on each page i am passing logout-file.php link and checking session variable like this
  9.  
  10. <body bgcolor="white">
  11. <a href="logout_file.php">Sign Out</a>
  12. <?php
  13. session_start();
  14. if(!isset($_SESSION['employee']))
  15. {
  16. echo "Your are Logged Out";
  17. exit;
  18. }
  19. else
  20. {
  21. echo "Welcome Mr.".$_SESSION['employee']['username']; //check it
  22. }
  23. ?>
  24. Body data like other links
  25. </body>
Now on each page i have given links like this

Now listen my problem on each page i am printing echo "Welcome Mr.".$_SESSION['employee']['username']; So think i am on signinactionpag e where there other link like show file,upload file etc.. with sign out button now as i click on sign out button i am redirected to login page(no probelm up to here) But when i press back button (now i am logeed out) then i am again in signinaction form and Mr.Deepak.Narwa l is still displaying there why so if i am looed out session destroyed and why this name is displaying..why so

2. along with this one more error is displaying on each page which contain logout button and this session coading...

Warning: session_start() [function.sessio n-start]: Cannot send session cache limiter - headers already sent (output started at E:\xampp\htdocs \upload_file.ph p:6) in E:\xampp\htdocs \upload_file.ph p on line 7
My logout-file.php page is like this
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. session_start();
  3. session_unset();
  4. session_destroy();
  5. header ("Location: signinform.php");
  6. ?>
Jan 25 '10 #1
0 1684

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

Similar topics

2
21861
by: mr_burns | last post by:
Hi, i am getting the following errors when running my php script: Warning: Cannot send session cookie - headers already sent by (output started at c:\apache\apache2\htdocs\thegain\index.php:4) in c:\apache\apache2\htdocs\thegain\index.php on line 19
6
14658
by: Jeff | last post by:
I've searched the web for hours trying to figure out this problem and can't seem to find any pertinent answers. I have a website where the user starts on a login page, puts in their credentials and hits a submit button, which then takes the user to a 2nd PHP page which simply runs PHP code that checks the user's credentials from my database, and if authenticated creates a session, assigns a few session variables (including a session...
2
3751
by: HolaGoogle | last post by:
Hi guys i'm back again!! i'm having a small problem with refreshing my form after saving data in my database! here's what i'm trying to do: * In my UpdateDB.asp form i display my database records and the user can make changes on whatever record he wants; * after he'll have to save changes by hitting the save button on the form; * when i receive the "save" action, i update the database; set a session variable that i'll use later to true (...
2
3384
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and then appends the data to a dataset that is built in the Page_Load code in the if(!isPostBack) block. When I try to add a row in the button click event code I get an error saying that "Object reference not set to an instance of an object". I'm...
0
2399
by: Luis Esteban Valencia | last post by:
Hello I wrote a program with code behind in C# to add row into table dynamically and the program worked very well in .Net Framework 1.1. When I run this program in .Net Framework 2.0 beta version, the program is not working as in version 1.1. So what is the problem? Microsoft declared that the version 2.0 is fully backward support, but it is not. Is that the problem with 2.0 version? I find out the problem in version 2.0. After...
0
1583
by: Frank | last post by:
Any suggestions on how I should handle this? I was asked to convert a small web application that was written in classic ASP into ASP.NET. The original site uses some VBScript to interface with an ActiveX control, which is contained in a CAB file. Somehow, I have managed to use the original VBScript in a respective .NET page, but there are several problems.
0
1416
by: graphicsxp | last post by:
Hi, WebPage Description: Contains one datagrid with link button column and one gridview with dropdownlist column. <asp:LinkButton id="QueryName" runat="server" autopostback="true" onclick="onclick"></asp:LinkButton> <asp:DropDownList id="GroupQueries" runat="server" width = "150px"
6
4896
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
4
2296
by: Thomas Eichner | last post by:
Hi, does anybody know a public website which offers a service that displays all data send by a browser (or an app calling the website), especially HTTP GET and POST data, browser data etc.? I have a hard time finding what really my app is sending and this would be a great help! Thank you very much ! Thomas
4
2485
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code m_Token = null in order to destroy the session token when the user logs out. However, I'm finding that setting class instance to null results in no header being sent back to the client, with the result that the client actually remains with an...
0
8828
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9319
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4599
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.