1

I have a big problem but easy for you, which I had to solve before and now I dont have any more options than fix it. Here's what I got:

If i send data to the DataBase, everything works great but if in some case the user decide to reupload the page, the same information that was send before send again and the database will save it. How can I avoid this? I dont want whenever the page reupload the information send again, and again and again! it'll be a disaster!

Thanks for help!

4

1 に答える 1

1

What you need to do is use the Post/Redirect/Get pattern:

http://en.wikipedia.org/wiki/Post/Redirect/Get

This pattern solves your problem exactly.

Basically, right after the database is updated, redirect the user to some other page (with a message such as "Updated successfully!").

于 2013-03-09T20:56:10.833 に答える