PHP form processing with URL parameters and Forwarding to HTML page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Miles Davenport

    #1

    PHP form processing with URL parameters and Forwarding to HTML page

    Apologies for cross-posting, but I felt this query would be relevant to HTML
    and PHP forums.

    I am currently modifying a PHP IMAP script which allows the user to view
    their email via a web browser. I have made use of URL parameters which are
    passed to the webserver, and processed by the PHP code (better than
    javascript). No problems so far :)

    When I have reached a point where I no longer need these parameters, I use
    PHP header/location forward to reload the HTML form page. If my page was
    http://www.mysite.com/ foo.html and I was forwarding** to this specific URL
    (without any ***?myval=????& anotherVal params).

    When I reload the form**, I keep my URL parameters that were present*** the
    previous time the form was processed (they are there in the URL_REFERRER).
    Can someone tell me how to lose the parameters, so I just forward to
    foo.html. :)

    thanks :)

    cheers

    Miles.












  • Toby A Inkster

    #2
    Re: PHP form processing with URL parameters and Forwarding to HTML page

    Miles Davenport wrote:
    [color=blue]
    > When I have reached a point where I no longer need these parameters, I use
    > PHP header/location forward to reload the HTML form page.[/color]

    Why? If some parameter is there that you don't require, simply ignore it.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

    Comment

    • Miles Davenport

      #3
      PHP form processing with URL parameters and Forwarding to HTML page

      My URL parameters provide additional information/behaviour for the
      form. After a form transaction has been completed, I want to reload
      the form without the parameters, so it "starts over".

      Miles.



      Toby A Inkster <UseTheAddressI nMySig@deadspam .com> wrote in message news:<pan.2004. 03.29.21.52.58. 228326@goddamn. co.uk>...[color=blue]
      > Miles Davenport wrote:
      >[color=green]
      > > When I have reached a point where I no longer need these parameters, I use
      > > PHP header/location forward to reload the HTML form page.[/color]
      >
      > Why? If some parameter is there that you don't require, simply ignore it.[/color]

      Comment

      • Toby A Inkster

        #4
        Re: PHP form processing with URL parameters and Forwarding to HTML page

        Miles Davenport wrote:
        [color=blue]
        > My URL parameters provide additional information/behaviour for the
        > form. After a form transaction has been completed, I want to reload
        > the form without the parameters, so it "starts over".[/color]

        Then something like this:

        if (isset($_GET['startover'])) {
        unset($_GET['parameterIDont WantAnymore1']);
        unset($_GET['parameterIDont WantAnymore2']);
        unset($_GET['parameterIDont WantAnymore3']);
        }

        ?

        --
        Toby A Inkster BSc (Hons) ARCS
        Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

        Comment

        Working...