473,395 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Why the user always faced the different page when click back button?

65
Dear all,

I would to ask that why the user always faced the different page when user click the back button instead back to page2.php but it go to page5.php..I remember in asp, we use the global.asa to solve this problem because the server will confuse when many user login the system as a member and every members go different pages.

So may i have anyone to guide me?
Sep 3 '07 #1
8 2437
Atli
5,058 Expert 4TB
Hi wish.

Could you show us your code? There are several different ways of doing what I think you are attempting, and each of them can fail in more ways than I can imagine.
It is very hard to debug code you can not see :)
Sep 3 '07 #2
wish
65
Hi,

I just have asp language code but i dun know is same as php?

This is the code in asp and called it as global.asa
Expand|Select|Wrap|Line Numbers
  1. <script language="VBScript" Runat="server">
  2. sub Session_OnStart()
  3.    session("userid")=""
  4.    session("isuser")="false"
  5. end sub
  6.  
  7. sub Session_OnEnd()
  8.    session("userid")=""
  9.    session("isuser")="false"
  10. end sub
  11. </script>
  12.  
with this page, then the user will not faced the problem in asp.But in php, i dun know this code can apply in or not?
Sep 3 '07 #3
Atli
5,058 Expert 4TB
Hi.

Please use [code] tags when posting code. It's impossible to read it without them.

That said...
I'm still not understanding the problem. As far as I can tell the ASP code you posted is meant to reset those two session variables when the session starts and when it ends.
But how does that affect where your user is redirected when he presses the back button?
Why would you want to reset those variables when the sessions starts and when it ends?
Couldn't you then just as well use regular global variables?

The code you posted can be easily re-written in PHP. I am not very good with ASP, however, so I don't know if your subroutines get called by some automatic ASP mechanism or manually by your.
In PHP you would have to call them manually.
Sep 3 '07 #4
wish
65
Hi,

Let say the application is run at the server now and got two people are access the application and one user is browse page2.php and another user browse is page5.php. When the first user in page2.php click back button then the first user cant back the original page but the page is back on the first user pc is the page that browse by the second user.

My problem is solve the confuse in multiuser in application.

Can u give me ur guideline?
Sep 5 '07 #5
Atli
5,058 Expert 4TB
Ok, I'm trying to understand what you mean.

What you are saying is...
Your first user is viewing page 2. The second user is viewing page 5.
I'm assuming they both stated at page 1, so when they press the back button, that would be where they should end up?

Now when the first user clicks back, he is sent to the page the second user is currently viewing?

Am I understanding correctly?
Sep 5 '07 #6
wish
65
Hi Atli,

U r absolutely right. Both users come from the same start page. How the problem can occurs?
Sep 5 '07 #7
Atli
5,058 Expert 4TB
Thats weird.

The back button in a browser should not be affected by anything your PHP code is doing, unless you are redirecting it, and certainly not by anything other users are doing. It should go straight back to the last URL it was viewing.
Could the content of that URL be changing?

Unless it is a back button in your web application? That could well send the user somewhere it is not supposed to if there is a error in the code.

How does you application work? Can you give us an example of what the URL looks like on each page? And if you coded the button used to send users back, could you post that code?
Sep 5 '07 #8
wish
65
Hi,

i just simply write the javascript code and the code in php is

<script>draw_button<"butback","manufaclist.php","" ,"","",""></script>

the problem is no always occur but sometime it will.
Sep 7 '07 #9

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

Similar topics

3
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their...
5
by: V. Jenks | last post by:
Long story as short as possible: I have a page (aspx) that contains a user control (ascx). In the form the user can enter a username and password. If they do, the password box auto-posts-back...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...

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.