PHP Shoutbox and POSTDATA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Svinja
    New Member
    • Nov 2007
    • 25

    PHP Shoutbox and POSTDATA

    Hello,

    I made a shoutbox in php, the problem is that i am sending shoutbox data(name and text) with submitting forms, that way i get POSTDATA. The question is, can i send my shoutbox data to php by not using POSTDATA?. Url(GET) passing is not acceptable. If not, can i clear my POSTDATA?

    Thx.
  • gregerly
    Recognized Expert New Member
    • Sep 2006
    • 192

    #2
    Originally posted by Svinja
    Hello,

    I made a shoutbox in php, the problem is that i am sending shoutbox data(name and text) with submitting forms, that way i get POSTDATA. The question is, can i send my shoutbox data to php by not using POSTDATA?. Url(GET) passing is not acceptable. If not, can i clear my POSTDATA?

    Thx.
    The usual way you would do this would be through the post array. Once you have used the data from $_POST, you can clear the post data by using:

    [PHP]<?
    unset($_POST);
    ?>[/PHP]

    Comment

    • Svinja
      New Member
      • Nov 2007
      • 25

      #3
      Originally posted by gregerly
      The usual way you would do this would be through the post array. Once you have used the data from $_POST, you can clear the post data by using:

      [PHP]<?
      unset($_POST);
      ?>[/PHP]
      Thx for answer, this deletes the POST variables but the problem is i still get the firefox warning box ("The page you are trying to view contains POSTDATA...") after the user reloads the page, how can i make this box NOT show up when the user reolads?

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by Svinja
        Thx for answer, this deletes the POST variables but the problem is i still get the firefox warning box ("The page you are trying to view contains POSTDATA...") after the user reloads the page, how can i make this box NOT show up when the user reolads?
        Impossible.
        What the browser does is out of your hands.
        Even though you have unset the POST array, the browser is unaware of this, and carries on doing what it would normally do.

        Comment

        • Svinja
          New Member
          • Nov 2007
          • 25

          #5
          Well, ok, it is impossible to solve the problem but i found a workaround, i used javascript to redirect to the same page, this way the post array is deleted but i get the flicker because i reload the page twice.

          Thx for your help

          Comment

          Working...