php - codeigniter after submission if refresh submit again -


I think that's simple but I'm new to codeigniter, so please help. I have a form page that takes data and when the store is deposited then data in the database. Then I tried two ways to redirect back to the main page:

  ago: $ this-> Load-> Scene ('home'); Second: Redirect ('/ login / form /', 'refresh');   

They successfully redirect or load the home page, but the URL is still / property / new_property which is the view for data input. When I refresh the home page with the above mentioned URL, the data is re-submitted so many records in the database. How can I redirect to home and make url property / home?

Thanks

$ this-> Session-> Set_flashdata ('message', 'new post has been added');
Redirect ('somefunction', 'refresh')
After successful saving, you will change your URL to delete and redirect your submitted data.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -