Results 1 to 2 of 2

Thread: $_POST requires repost of data on page reload

  1. #1

    Thread Starter
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    $_POST requires repost of data on page reload

    Is there a way i can avoid having to repost the variables if i use $_POST.

    Login.php ---> Form action / POST ---> main.php

    this works but when i refresh main.php i cant the 'this page cannot be displayed unless you repost the page ' or something must be as i'm using $_POST to grab the vars.

    Its because i use an include in main.php so you could say the main.php is more than one page. On the first time round is a verifier of values then its an actual page and the cookie determines if its displyed or not i need to get rid of the $_POST when it an actual page and let the cookie take over.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: $_POST requires repost of data on page reload

    After validating the form data redirect to another page or the same page and the post data will be discarded.

    Before any output is sent use this to redirect
    PHP Code:
    header('Location: newfile.php'); 

Posting Permissions

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



Click Here to Expand Forum to Full Width