[wp-hackers] Redirecting Users In Admin To Avoid Resubmitting Information

raj websweetweb at gmail.com
Sun Oct 25 03:37:42 UTC 2009


I am creating a simple create, edit, update, delete [something] 
wordpress plugin.
In the create screen, the user inserts something in the database and is 
sent to the
confirmation message. But the data gets inserted again if the user 
refreshes the page.

How do you handle this? How do you 'redirect' users to a different
location such that once they get there, the action shouldn't be
performed again if they refresh that page. I have tried using a
javascript redirect to send the user to the confirmation page but this 
method
loads the administration menu items before executing the javascript.

I would like to know:

1. If there is anyway to send javascript output in the body before any
of the wordpress administration interface code is sent to the browser.
2. If it is possible to do this without javascript, if so how?

Raj Sekharan



More information about the wp-hackers mailing list