php - how to control database update by going back and directly opening the link -


created 3 pages. first 1 login page , second page details (userinput.php) , while submitting update details in database , redirect page (thankyou.php).

now requirement is

  1. if directly open (userinput.php) page should not. instead should redirect login page.

  2. after given user details(userinput.php), go (thankyou.php) page. there chance of updating database same info going (userinput.php) page clicking button in browser.

how can overcome problem.

thank in advance.

  1. you must use session this: , check session variable that:

<?php session_start(); if(empty($_session['variable'])) { header("location:login.php"); die(); }


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -