By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

PHP Shoutbox and POSTDATA

P: 25
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.
Feb 14 '08 #1
Share this Question
Share on Google+
4 Replies


gregerly
Expert 100+
P: 192
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]
Feb 15 '08 #2

P: 25
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?
Feb 15 '08 #3

Markus
Expert 5K+
P: 6,050
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.
Feb 15 '08 #4

P: 25
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
Feb 15 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.