At 09:13 AM 4/11/2002, you wrote:
>Ok so this really doesnt have anything to do with MySQL but I thought this
>might be a good placeto ask.
>Ok heres the problem. I am constructing a Message Board with MySQL and php
>(was usingASP) and I dont want the user to reload/repost data. For 
>example, say the
>user goes to post amessage, after they hit the post button it takes them 
>to a temp page
>saying that there post wassuccesful with a link to go view the post. The 
>problem arises if some one
>decides to hit thereload button. Because of the way I have the posting 
>page setup it will
>reload the page and postthe message again! doh!
>Anyways, has anyone come up against a similar problem and found a
>way around it?
>
>Thanks in advance.
>-Nick

Nick,
         PHP solution. I suppose you could create a session variable with 
the last topic posted ($last_topic_posted) that gets set in the temp page 
(confirmation page). The previous page (Post.php) would check to see if the 
session variable exists when the user presses the "Post" button. If it does 
it warns the user it was already posted.

         MySQL solution. You would have to uniquely identify each post from 
the user to define a unique index in MySQL. Perhaps use the session id and 
topic title to prevent  two such records from existing in the table.

Brent


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to