Welcome Guest, Not a member yet? Register   Sign In
trying to understand form_validation
#11

[eluser]pickupman[/eluser]
This was already in my code
Quote:
Code:
redirect('myBlog/comments/'.$entry_id, 'refresh'); //prevent reload/reinsert

Adding 'refresh" as the second parameter will clear the post array. And I forgot that I had removed the duplicate declaration of $entry_id to the above line should read
Code:
redirect('myBlog/comments/'.$data['entry_id'], 'refresh'); //prevent reload/reinsert

And WanWizard is spot on with requiring validation for a table's primary key. Without it, the data becomes useless, and possibly screw up your database. I could insert as many comments as I want into your db that would never be seen unless you viewed the tables manually.
#12

[eluser]RickP[/eluser]
Thanks, that solves my problem.

The documentation is not at all clear on exactly what adding 'refresh' does. Since I'm not on a Windows machine I could see no reason to use it.




Theme © iAndrew 2016 - Forum software by © MyBB