Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Login, Then Go Back To Last Visited Page


I have a form that calls login.php, and the form can be included allmost every where in my site, for login purpose. But as soon as the login verifies.. the browser is redirected to one sertaint page. PHP Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Want My User To Have To Go Back To The Index Page As Soon As They Login.
I am having a little trouble intergrating a login/user management script with my html pages. I have used the div tag put in my php in there and put the rest of the php where it is originally placed in the script. Here is my problem.

I would like my user to stay on the same main page while the login part changes(goes to the members area). I have tried using i-frames but if there is a link in one, the main page does not change the i-frame does. Can this be solved with more php. I do not want my user to have to go back to the index page as soon as they login.

View Replies !
I Want The Page To Go Back To My Login Page.
I want to logoff my application and I have set up a link to do this. I
got it to destroy my session, but I can't get the page to go to the top
of the browser and do a page refresh. Here is the code I am using.

First there is the link I am using.

printf("<a href="%s?logoff=%s">%s</a><br>", $_SERVER['PHP_SELF'],"logoff", "LOGOFF");

Here is piece I use right at the top of the script to destroy the
session and try to refresh the page.

if (isset($_REQUEST['logoff'])){
session_destroy();
$_SERVER['PHP_SELF'];
}

What do I have to do to get the refresh to work?

View Replies !
Login Script That Shows A Last Visited State
How can i do not using cookies but using PHP and MySQL to make a script that when a user after making a login it shows a last visited state, like: You last visited: 11 Hours Ago at 12:48 AM .

View Replies !
Index.htm Going To Login Page And Sending Back To Index Page
1: A visitors visits a.html page. decides to login and post comment. goes to login page and logs in then I want to send him back to a.html page how do I do that? Here is my login page and login.php page.

2: Same as above but I want to send them back after some time... while I make them view the error, why they have not been able to login. Code:

View Replies !
Last Page Visited
I have a form on my website where users can type in their feedback. When they click send they are taken to a 'Thank You' page. On this thank you page I want to put a link that will take them back to the page they were browsing. As they can get to this page via a few other pages I need it to remember the last page they were on. Also when they return to this page I want all forms cleared if possible.

View Replies !
Sending The Value Of The Last Page Visited
Is there a way of sending the value of the last page visited...ie. first_page.php?

View Replies !
Previously Visited Page
How would you get the previous page's url in php code I want to have a link to the page the user just came from but it could have been a number of different pages.

View Replies !
Setting A Session To Store User's Last Page Visited?
I have the following code that sets a session to return the user back to the previous page they were on.

$_SESSION['last_page'] = (!isset($_SESSION['curr_page'])) ? "http://www.mydomain.com/page1.php" : $_SESSION['curr_page'];
$_SESSION['curr_page'] = $_SERVER['PHP_SELF'];

Bascially I am looking for a better way to do this. The problem with this is you need to hard code what the previous page was. Is there anyway to dynamically set what page the user was on. What if the last page URL had an id in it like...

http://www.mydomain.com/?id=14

How could I set this as the previous page in a session?

View Replies !
Cookies - How Do I Read It Back And Process The Information As A Login?
I have a project where we want users to log in and they will be directed to
pages that are appropriat for them (Per thier job in the company) I can set
the user name and password in the cookie so as to make it so they do not
have to keep loging in, but how do I read it back and process the
information as a login?

The cookie is set to auto expire at 72 hours but
security is not the biggest issue as I would just fine URL encoding this,
but my boss wants it in a cookie instead so it will auto logon when a
employee comes back to that part of the site?

View Replies !
Page Expired After Going Back From Del. Pageto Form Page Where Comment Is Submitted..
i've made a submit comment form with php and mysql, the form has an action to itself with a hidden var like this: input type=hidden action=add

When i delete a comment on the page i go to a page called delete.php3 and there is a link with a javaline which goes -1 back in my history..

When ive added a comment, the comments page contains action=add and when i delete a comment, i want to click on the link to go back to the comment page, but then, it doesnt work and it says:

Page has expired.

I wondered how to deal with this kind of problems........

View Replies !
Page Has Expired Message In Between The Php Page When I Click Back In Explorer Menu
I have a php script page, which is basically quiz. Visitors (after login in
with their email address) are supposed to answer each question, and when
they click the button at the bottom, the next page will show which problems
they got right or wrong.

Now my visitors, after seeing some problems they got wrong, click Back
button at the Explorer menu, and if they do, they get the below message:
=========================
Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.
========================
Below are the script that I am using. This scripts are after initial login
page, which asks for visitor's email address. I have authorized visitors
already in my MySQL table, and only the visitors whose email address is in
my MySQL table are allowed to login......

View Replies !
Create A Separate Page With One Login That Let's Me Login To All Of The Sripts At Once?
I'm building a website using various php scripts from I found on hotscripts. Because I'm not much of a programmer myself I'm using a separate script for the blog, another one for the links section and a different one for the gallery and so on. The downside to this is that I have to login on a separate page to update the gallery and another page to update the blog and so on.

Is there a simple way to either remove the need for a login for all the scripts and just create a separate page with one login that let's me login to all of the sripts at once?
Or if there's a script that can kinda save the passwords and logs in for me?

View Replies !
Main Page Login = Forum Login
This is going to be a website for a club im in at University. Now, I only want members of that club to be able to register.

The problem is that they pay a member fee. I want to know a way that when they pay me the fee (in person) I can give them a unique confirmation number from which they can register properly (sorta like a CD-Key). Code:

View Replies !
Redirect From The Login Page To The Login Page
I have been working on a cms, and I got the login and main admin page working, so what I am trying to do is make it so if your not logged it, it redirects you to the login page. But the problem is once it gets to the login page, it continues to redirect from the login page to the login page, so its nonstop. How can I fix this.. Code:

View Replies !
Log In Page That Goes Back To REFERRING Page
I am using the following code to initialise a session, depending on
whether-or-not the users' log in attempt has been successful.

if ($session_ok == "TRUE") {
//open the session
session_start();
//assign user details to session
$_SESSION[txt_user] = $user_id;
$_SESSION[user_pass] = $user_pass;
$_SESSION[ses_state] = "TRUE";
header("Location: ../index.php");
}

as you can see the script then refers back to my index.php page, after the
session is ok'd.

What I would like to do is change this so that is goes back to the referring
page, instead of the index.php page, which requires the user to then
navigate to their previous page again.

I have attempted to use $HTTP_REFERER, although for me (on IE6) for some
reason their is no value in the variable!

View Replies !
Login Page Not Redirecting After Login
I've used this same snippet of code in other login forms without a problem (with some slight modifications from script to script) but this one seems to baffle me.

Basically it takes the login and validates the entries (validation works, error messages display if left blank), then checks the database for a match. If there's a match then it is supposed to forward the person onto the proper page using the 'header' function. Problem is it's not. Basically it's reverting back to the 'index.php' page (login page) and the display is completely blank. Here's the code for index.php: Code:

View Replies !
'Back' Page After Logout
I'm using HTTP authentication as my login mechanism, and I'm having problems with the logout. It appears to work (as in I get the right message when I've logged out) but pressing the 'Back' button gives me the information on the previous page as though I hadn't logged out at all.

1) Does $PHP_AUTH_USER not get cleared when a "401 Unauthorized" is encountered?

2) Is there any way to force the logout to apply to previous pages (I'm thinking using sessions or cookies perhaps), or do I have to get the user to close the browser window?

View Replies !
Back To Html Page From Php
How do you go back to the html page you came in from from inside a php
script?

View Replies !
Back To Previous Page?
is it a way that we can have "go back" to our previous page? cos normally when we use back command in our IE or NS. we should have this error message appeared Warning: Page has Expired blah blah blah..

so how should I program so that i can "go back" e.g: i got two php, fromhere.php and cominghere.php is there anyway that i can do in order to reach the page "fromhere.php"?

View Replies !
Going Back To A POSTED Page
how can i stop the browser from warning the user that "Post Data" will be resubmitted... For example, on goolge you do a search, then click on a link, then clikc the BACK button in your browser, it dosn't give you the warning that you are going back to a page with posted variables?

View Replies !
Posting Back To The Same Page
I have a website that uses user authentication. The login does a post back to itself to check set usernames and passwords.

<?php echo $_SERVER['PHP_SELF']?>
sample url:  .../admin/login/index.php

This is working on a linux box where the end of the php code sends the page off to a ccc.php page for access checking. So after logging in on the index.php page, you eventually get returned to admin/ccc.php.

I reused the same code on a windows box and the .../admin/login/index.php takes me to .../admin/login/index.php/admin/login/index.php

does anyone have a clue as to what might cause this?

View Replies !
Does 'Back' Reload The Page?
I notice that when I click the 'Back' button my previous script runs, i.e, all the php code runs (I previously thought that maybe the previous form displays without the code re-running).
However, I do not get the expected value displayed on my form.

After populating one element in formA with &#3917;' (just any number) and submitting to formB (using POST ---> Redirect --> GET to avoid the 'expired from cache' message) I then click the 'Back' button and the 17 does not appear. In the code below, after clickng 'Back', I see as output from the echo statement that rb_value[0] is, infact, &#3917;' but within the form, the text element named rb_value[0] displays as empty.

Does anyone have suggestions why this might be?

It might have to do with that I do not understand what the 'back' button does. Or maybe with my PRG (post - redirect - get) model.

Here is part of the code:
echo "rb_value[0]=".$rb_value[0]; //After clicking 'Back' I see that rb_value[0] is 17

if (isset($rb_value[0])) {
$rb_val = $rb_value[0];
} else {
$rb_val = 1;
}

$line.= "<td width="20%" valign="center" align="left"> ";

// This element displays as empty instead of the expected 17
$line.= "<input type=text name="rb_value[0]" value="$rb_val" size="25" maxlength=25 </center> "
$line.= "</td> ";


View Replies !
Go Back To The Previous Page
is there any simple way of knowing which page within the site the user came from? Since after the user do something such as logging in and i want to be able to redirect the user back to the page from which he/she came from.

View Replies !
Redirection Back To The Page Before You Log In When You Log In.
how to do redirection back to the page before you log in when you log in.

View Replies !
Back To Last Page Viewed
i was wondering if php is capable of doing the following and if so was hoping i could get some help doing it. i have a wordpress blog and change the content of the sidebar depending if the page being viewed is part of the blog (home, archive, search, or single post) or an actual seperate page (like the about, disclaimer etc).

what i'd like is to have a link on the sidebar when viewing a page that says "back to blog" thats acts as a back button like in a browser, going back to the last page viewed. except what i want is for it to go back to any page that isnt a page, so basically the last blog page. um, does that make sense?

View Replies !
Page If Back Button
I have a php page which is a sign up page, once signup is finished the user is redirected to a new page. Sometimes (and it's rare) the user hit's the back button and then re-submits the form etc. I mean like I said it's rare but still bothers me, so on the last page I kill all the sessions. Which only works if the user hits the back button but the page is refreshed. So basically I want to know if it's possible that when the back button is hit to refresh a php page?

View Replies !
Warning: Cannot Modify Header Information - Redirect From Login Page To Logged In Page
I am trying to redirect from login page to logged in page, but using the {header( 'Location: C:wampwww' ) ;} is giving me this error {
Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwpassword.php:14) in C:wampwwwpassword.php on line 35}, find below my code:

View Replies !
Login In A User, And Then Pass The Username And Session_id From Page To Page
I want to login in a user, and then pass the username and session_id from page to page until the leave the admin area of the site. Here's a simplified function: PHP Code:

View Replies !
Mail Server - Use My Page Login For The Mail Login User Is Stored In $_SESSION
I have a problem and no time to google it and i hope someone will guide me. I have a linux server (slack10) php/mysql and a website where you can create accounts and login.

i need to install a mail server with a web interface, i need to have a script that creates automaticly an email account when my page creates an account and a way to use my page login for the mail login user is stored in $_SESSION and the mail will be shown in iframe any sugestions?

View Replies !
Page Back Into Index's Iframe
On my index, I have a menu on the left with the rest of the page an iframe.How would I reinsert any pages found on the internet back into the index's iframe using php?

View Replies !
Ob_start() And Going Back To The Previous Page
1. How do I go back to the previous page using PHP?

For example, I have a log-in process which validates username and password of members, and also retricts access to certain pages. So if a member goes into a page without logging in, the member will be presented with a form to log in. How can I make my script go back to the previous page they were trying to access prior to logging in?

2. What would happen if I use ob_start and ob_end_flush() on every page that I have? Would it affect loading time? Or would loading time be the same except that it would cache everything first? Isn't that suppose to make it appear that the page loads fast?

View Replies !
Back A Page In Browser History
Is there a PHP snippet that will take a user back one page in browser history, or is everyone still using the JavaScript equivalent?

View Replies !
Navigation Back To An Html Page
I can't seem to figure out how to navigate back to an html page from a php page.

View Replies !
How To Redirect A User BACK To The Page
how to redirect a user BACK to the page they were trying to access while not being logged in, AFTER they log in.

for example, i try to access page1.php, but i am not logged in so a header("Location: login.php"); directs me to the login page. then i login, and the script redirects me back to page1.php...

i tried this using the $SERVER['HTTP_REFERER'] variable but it doesnt give a value unless the user CLICKS on a link to the next page (redirecting using headers doesnt work)

View Replies !
User Login Page - Password Requiring Page
i just created a user login page which works. However, I don't know how to get them to a new password requiring page after they press the submit button. How do I go about getting them there?

View Replies !
Back Button, Page Expired, GET And POST
I have read you can solve the back button problem with the page expiration by using GET method instead of POST. When I use the GET method with form data, it doesn't work.

I have a page with a dropdown submitting to a page getting the variable via POST. Then it links to another page, and I want them to be able to come back to the second page. When I use GET instead of POST I get an error.

View Replies !
Refresh Page After Hitting Back Button
I have a page with Dropdowns that are linked to a database.
After selecting one of the options and going to the next page, it will display the results of that dropdown item as pulled from the database.

If a user hits the back button, then selects a different option and hits "submit", what is listed is the results of the first selection AND the results of the second selection.
Is there a way to either:
1. Refresh the page upon hitting the back button on the browser
2. upon hitting the back button, the browser forgets the selection previouslly made.

View Replies !
Writing Pdf Docs And Going Back To The Previous Page
im trying to write a pdf document which contains two columns of data.
when the column on the left crosses over to the next page i need to be
able to go back afterwards to the previous page to write the content
for the right column.

currently im trying to do this with fpdf but it doesnt seem to allow me
to go back to the previous page once i have finished writing content
for one column that crosses over.

View Replies !
Page Has Expired, BACK-button -problem
I have Windows XP&IE6.0.2... (SP1).

I'm coding one project with PHP.
I get "Warning: Page has Expired" when I try to get back to the "POSTed
page" (page whither moved from FORM-page).

Better explanation:
- Pages are:
* Page A: Front-page
* Page B: Page where is www-FORM

#1.) From Page "A" I move to the page "B" by clicking link on page "A" and I
fill the form's fields
#2.) Then I click SUBMIT-button and I moved back to the page "A"
#3.) I move to the page "B" by clicking link on page "A"
#4.) I click "BACK"-button from browser
#5.) I got "Warning: Page has Expired"

I want that when I click BACK, I will be moved to the page "A" straightly
without warning
(of course then post-data can't get re-sent)

Got any idea how in PHP I can prevent this warning?

View Replies !
Echo A Page Which Resubmits Itself Back To Same Script
I am trying to upgrade my mailer script so that rather then the user having to select a table of emails from our mailing database for every 500 recipients the script will just select a single table and then loop through every 500, echo an html page containing Javascript which then resubmits the data back to the script.

Currently we do this,

Create email -> Select a mail table -> Submit form and script runs off 500 or less emails -> Press Back on browser -> Select a new table -> Submit form and script runs off another 500 or less emails.

What I would like to do is this,

Create email -> Submit form and script loops through first 500 emails and sends -> Echo's a page with a countdown timer which resubmits the data including the last row number of the table -> Script then picks up from the last row (501) and sends another 500 emails -> Echos the countdown timer again if need be and so on until the mail is finished.

My script will get all the way to the echo of the countdown page but when the javascript finishes, the script doesn't actually submit, or at least does not appear too. I am wondering if this is because the script that echo's the page (automailer.php) cannot be the same script the form is meant to submit too?

View Replies !
Using Bakspace Cannot Link Back To Previous Page
i use backspace to link back to my previous page.. but it fails me ...showing webpage has expired .. what should i do??

View Replies !
How Do I Point The Link Back To The Original Page?
I have a link that creates a pop-up window.

<p><a href="javascriptopUp('calendar.php')">Calendar</a></p>

On the pop-up window the user selects a link. How do I point the link back to the original page? i.e. the page that created the pop-up window.

View Replies !
Redirects The User Back To The View Page
i am facing a strange problem of redirection. After the user fills up the form, i submit the data to save.php file and at the end i have a header which redirects the user back to the view page.Below is the code of save.php: Code:

View Replies !
Back Button Doesnt Display Previous Page
Here is an example of my code. PHP Code:

View Replies !
Making A 'Go Back' Link From An Errorous Feedback Page
I am working on a 'contact' page on my website. All the code is in contact.php When $name, $email and $message are uninitialised, the page loads with all the input fields.

If they are initialised, the page checks for errors. If there are no errors, a "success" message is displayed. If there are errors, the errors are displayed. In addition to displaying the errors, I'd like to have a link which goes back to the input fields (i.e. contact.php without $name, $email and $message initialised).

Making a link to contact.php does not work, as the variables are still initialised, I think, and therefore all the error messages are just displayed again. Hitting 'Back' in the browser works well - how do I make a link 'go back' though? (I think I saw some javascript 'go back' commands a few times before...)

Hitting 'Back' in the browser unfortunately resets/clears all the fields, if something was typed in. I'd like it if the fields would not be reset/cleared. Could I please get some advice on how I can solve this problem please? If I need to use cookies, sessions or something like that, then just let me know how I can make a 'go back' link - I don't know how to use cookies / sessions atm, and right now I don't feel like learning to use them.

View Replies !
Redirect The User Back To The Page The Submited The Form From.
I have an email form on a site that I am working on. It sends from a small JS popup that is activated by clicking on a link. that form sends to a php page which sends the user entered variables to an email address. what I am looking to do is instead of going to a new page when the form is sent I want to redirect the user back to the page the submited the form from. I have it set up to send a hidden var to the php page with the full url of the origional form. here is the functional code I have on the php page. what is hapening is the email is being sent but the php page is being displayed instead of redirecting. Code:

View Replies !
Back Button To Previous Multi Purpose Page
the index page passes paramiters tot he view page to telling it what to view. then the user can go to the delete page to delete on of the items viewed.

from the delete page I want to the user to go back to the viewpage using the same paremiters. Is there a simple way to just do a back link or do i need to pass the paremiters to the delete page then back again?

View Replies !
Login Page Produces Blank Page
What I get when I enter username/password and hit submit is a blank page and the URL never changes. In other words, the login page is 'index.php' and when submitted it should redirect to 'admin.php'. Instead the url/address stays at 'index.php' and the page turns completely blank.

In the previous thread, the problem turned out to be some missing indicator to the md5 encrypted password. Well, in this version, that's there! In fact, I used the ending scripts for that project in creating this project. So, why it won't work is a real mystery. Code:

View Replies !
Clicking Browser's Back Button Shows An Empty Page
On my website www.lahabitacionroja.com developed using Php I am experiencing the following problem:

When a user with MS Explorer 5.0 or older clicks the back button on the browser it shows an empty page...
If you try with MS Explorer 6.0 this problem doesn't happen.

Does anybody why it happens and if there is any easy solution??

Is it a browser issue, an Apache issue....

View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this:

<?php
session_start();
session_unregister($SESSION);
session_destroy();
unset($SESSION);?>

In each page I have this other script
#accesscontrol.php
<?
session_start();
if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo
{ #Maybe I use after. } else
{echo "<h1>Sorry...</h1>";
echo "<A href = "index.php"><H4> Login Univernet</H4> </A>";
session_destroy();
exit;}?>

The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.

View Replies !
Header Problem - Insert The Info Below And Then Jump Back To A Page.
i want to insert the info below and then jump back to a page. Here is insert and the header statement: PHP Code:

View Replies !
Avoid Buton Back And Page Refresh Double Insertation ??
I have a big problem with an page, every time a make refresh the data are inserting one more time the same happens with back button, does any one knows how to avoid this big problem,

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved