I got stuck in a situation quite strange in my code. It seems as the if condition does not work. Here is my code:
if ($mode == "edit") {
echo "edit mode!";
}
else {
$crud->set_rules('u_email','Email','is_unique[users.u_email]');
echo "NOT edit mode!";
}
When I go to this url: grocery/edit/55 (my edit mode) i see the line edit mode!. The strange thing here is the row below works:
$crud->set_rules('u_email','Email','is_unique[users.u_email]');
That line works, But I still do not get the message NOT edit mode!
Why is this line always works? Why is_unique also works in the edit mode?
Sorry about my bad english. and thanks for all :-)