SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    273
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy avoid jumps?? how to

    Hello

    I had made an online exam script ....which has these files in the following order executed in order

    start.php------>math.php<---->testvalidate.php---->(after all 30 questions)done.php


    this seem to work perfectly thanx to support from u guys..and gavrwin..

    BUT THE PROBLEM IS HERE..if a user directly types the path to done.php or testvalidate.php or math.php .....he can directly run those scripts..

    how to i channeelize the user to follow only the above order....ONLY!!!

    to add to this..if he changes the question get parameters....he can actually jump from question 1 to question 30...is there a solution to avoid user to change the get parameters?? POST IS NOT POSSIBLE PLEASE

    i have tried post parameter....not poossible..

    please let me know...help me people..

    thanx

  2. #2
    SitePoint Evangelist jplush76's Avatar
    Join Date
    Nov 2003
    Location
    Los Angeles, CA
    Posts
    460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just use a session variable.. something like

    start.php

    $_SESSION['start'] = true;


    then on math.php

    if(!$_SESSION['start'])
    {
    header("location: start.php");
    } else {
    $_SESSION['math'] = true;
    }

    something like that for your pages, get the idea?
    My-Bic - Easiest AJAX/PHP Framework Around
    Now Debug PHP scripts with Firebug!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •