Thread: security

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    Hi,

    In my site a person log in and views few pages and the then signs out. If he clicks back button in the browser then it goes back to the member page which I dont want to. I want to go to the home page with a error message. I use a cookie for validation.

    Raaj
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    Then u should use the no-cache headers etc, so the complete
    page is to be reloaded even if the user pushes the back button.
    Then u could check if the cookie is wrong and return an error.

    add something like this in the main page:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <?php
    header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
    header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
    header ("Pragma: no-cache"); // HTTP/1.0

    if(!isset($COOKIE_NAME)){
    print "<HTML>";
    ..error not logged in stuff
    print "/<HTML>";
    die();
    }
    php?>

    the original page goes here

    [/code]

    this should do the trick

    ------------------
    Greetings lewi

Similar Threads

  1. Members Only page security - please help
    By ariadne_ac in forum XML Programming
    Replies: 1
    Last Post: February 5th, 2004, 05:40 PM
  2. How to implement a security sub-system?
    By simplesimple in forum Beginner Programming
    Replies: 2
    Last Post: January 24th, 2004, 04:33 PM
  3. How to write IP Security Policy Programming code in Visual Basic
    By linh in forum Visual Basic Programming
    Replies: 3
    Last Post: October 28th, 2003, 08:04 PM
  4. Re: cookies and the security topic
    By IBBoard in forum PHP Development
    Replies: 3
    Last Post: June 30th, 2003, 08:36 AM
  5. FreeBSD security Advisory: security issues in ports
    By freebsdforums in forum BSD Help
    Replies: 0
    Last Post: May 13th, 2002, 01:54 PM

IMN logo majestic logo threadwatch logo seochat tools logo