updating on database with form validation |
04-27-2017, 12:32 PM
(This post was last modified: 04-27-2017, 01:05 PM by ciadmin. Edit Reason: added code tags )
I have a form filled with inputs , wich i form validate them , i have a problem with two of them , 'matricule' and 'email' , in my callback function i set that if when of those tow exists in the table, it won't be no insert or update , so my problem is when i want to update other fields without changing these two , an error will be shown saying that the allready exists. Can u tell me please how to solve this problem
here is some code : My controller function : Code: public function unique_matricule($matricule) my $all_matricules array is this :[{"matricule":"123123"},{"matricule":"140273"},{"matricule":"231564"}] So when i select the row that i want to modify , i want my code to delete its matricule from this array with unset function, can u tell me please what i have done wrong ? Thank you! |
Welcome Guest, Not a member yet? Register Sign In |