简体   繁体   中英

Form Re-Submission using Codeigniter with POST data

Hi all I have a CI controller which does things such as:

$this->loadEditingView($this->input->post('cleaned_post_data'));

which leaves the URL at the method that ran the above line such as:

mysite.com/project/main/editclasses

the problem I am having is that the I post alot of data and reload the view - meaning if the page is refreshed the form is re-submitted. I believe I can't use a redirect as the post data will be seen in the URL? what is the best way to prevent the annoying form re-submission

您可以将发布数据存储在会话变量中,并在使用后取消设置。

Your POST Data will not be shown on the URL when you redirect with redirect() method. That's not how it works, read about method here:

http://ellislab.com/codeigniter/user-guide/helpers/url_helper.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM