I'm trying to do a background check on an email field, the table where the email is "visualizza_lista" con 2.
It contains two tables: id, email, region.
I read this post and I used the code attached
http://www.chronoengine.com/forums/posts/f2/t23171.html
unfortunately the email although there is again recorded
Here you can try the form
http://formlab.progetto.ovh/component/chronoforms5/?chronoform=visualizza_lista
the code is this and it is added to server validatione>>email
my setup:
It contains two tables: id, email, region.
I read this post and I used the code attached
http://www.chronoengine.com/forums/posts/f2/t23171.html
unfortunately the email although there is again recorded
Here you can try the form
http://formlab.progetto.ovh/component/chronoforms5/?chronoform=visualizza_lista
the code is this and it is added to server validatione>>email
<?php
$db =& JFactory::getDBO();
$query = "
SELECT COUNT(*)
FROM `visualizza_lista`
WHERE `email` = '{$form->data['email']}' ;
";
$db->setQuery($query);
$count = $db->loadResult();
if ( $count ) {
$form->validation_errors['email'] = "Questa email è già registrata.";
return false;
}
?>
my setup:
This topic is locked and no more replies can be posted.