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.


Messages In This Thread
trying to understand form_validation - by El Forum - 07-02-2010, 01:39 PM
trying to understand form_validation - by El Forum - 07-02-2010, 08:33 PM
trying to understand form_validation - by El Forum - 07-03-2010, 05:38 AM
trying to understand form_validation - by El Forum - 07-03-2010, 06:43 AM
trying to understand form_validation - by El Forum - 07-03-2010, 11:31 AM
trying to understand form_validation - by El Forum - 07-03-2010, 12:28 PM
trying to understand form_validation - by El Forum - 07-03-2010, 04:08 PM
trying to understand form_validation - by El Forum - 07-04-2010, 07:45 AM
trying to understand form_validation - by El Forum - 07-04-2010, 08:05 AM
trying to understand form_validation - by El Forum - 07-04-2010, 08:15 AM
trying to understand form_validation - by El Forum - 07-04-2010, 11:02 AM
trying to understand form_validation - by El Forum - 07-04-2010, 11:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB