PHP Redirect vs POST Resend. Help?
I was coding my webblog and hit upon this tiny problem of refreshing a page. I am using the PRG (Post/Redirect/Get) pattern for my blog post where, after submitting a comment, it processes the data and redirects to itself in order to avoid resending of POST data once the user refreshes the page. But due to this I am not able to post a thank you message for the user that leaves a comment.
Here's the basic structure:
<?php
if(submit)
{process_data();
redirect_to_self();}
?>
<div id="post">Post content</div>
<div id="comment">All Comments</div>
<div id="form>
<!--Here's where I had like to show the thank you message-->
<form></form>
</div>
I am not at all with NOT using redirect as resending POST data is a punishable offense.
Any suggestions?
