Going to begin work soon on an original, fully customized WordPress theme for DailyWebGeek.com. More details to follow.
Going to begin work soon on an original, fully customized WordPress theme for DailyWebGeek.com. More details to follow.
After trying SEVERAL different possible methods & suggestions, I finally was able to achieve this by pointing my form’s PHP processing page to another page, rather than the same page itself (I really wanted to keep everything – form as well as form-handling all on the same page, but I found that I had to do this in order to prevent the user from re-submitting form data [through the contents of the $_POST array] that does not clear upon a user’s hitting the refresh button on the browser). And following that, I had my form’s processing page script then re-direct back to the original page where the form was located:
// redirect to the same page without the POST data
header(“Location: original-page-with-form.php”);
die;
Here are some of the pages I consulted in my research:
http://www.thefutureoftheweb.com/blog/get-redirect-after-post
http://www.issociate.de/board/post/171234/Clear_POST_variables_on_page_refresh.html
http://www.mail-archive.com/php-list@yahoogroups.com/msg04635.html
http://qaix.com/php-web-programming/437-896-clear-post-variables-read.shtml
*NOTE: Of course, keep in mind that any header(“Location: PAGE”); PHP code must be included BEFORE any contents are outputted on the page, otherwise you will get the lovely “Headers already sent” PHP error.
Hope this can help anyone else out there who may be struggling with the same issue
Running live, simultaneous beta tests using three different browsers for my wallpost app, with added jQuery/Ajax page refresh functionality. It is kicking some SERIOUS ass already (think: live chat possibilities, with saved record of all dialogues, that can be added to any page, threaded to any topic, etc) Yeah!
.
[Already, I’d like to thank programmer Srinivas Tamada for this rockin’ code!
And additionally, very special thanks to Maruf for helping resolve an annoying IE issue:
After I modified the code, the stupid forced-caching issue of IE (which was delaying or not showing the updated list of all the latest posts) managed to get resolved. Here’s my modified code of the function:
<script>
var refreshId = setInterval(function() {
$("#page_refresh").load(‘show-comments.php?v=’+ Math.random());
}, 500);
</script>