php - How can I go back to the previous page (using the browsers back button), without throwing any error "Confirm Form Resubmission" -
how can go previous page without throwing error confirm form resubmission, i've searched, followed patters such storing posted data in session variable in page main page , redirect session variable navigating page. doesn't work :(
this code:
index.php
<form method="post" action="value.php"> <div id="bar"> <div id="banner"> <img id="img1" src='1.png' height='40' width='200'>                         <div id ="login"> log-in       username:   <input type = "text" name = "username" size = "20" maxlength = "40">     password:   <input type = "password" name = "pass" size = "20" maxlength = "30">     <input type = "submit" name = "btnlog" value = "login" id="btn"> <div id="flip"> <p> forgot password? </p>   </div> </div> </div> </form>
value.php
<?php session_start(); $te = $_post['username']; $te1 = $_post['pass']; $_session['username'] = $te; $_session['password'] = $te1; $log = $_post['btnlog']; $_session['login'] = $log; header("location: main.php"); ?>
main.php
session_start(); $use = $_session['username']; $pas = $_session['password']; $getinfo = "select user_name,pass_word,id users user_name = '".$use."' , pass_word = '".$pas."'"; $query = mysql_query($getinfo); $getsomerows = mysql_fetch_array($query); $_session['ids'] = $getsomerows['id'];
Comments
Post a Comment