Hello
first of all, thanks for a great product.
Been trying to sort out the "Restrict duplicate entry" issue for some time now, but i cant get it to work in my form, been using this code as base:
But im having trouble with the parameters, the table name i can see in the "FROM" clause, but not quite sure what goes in the other ones, can anyone break it down for me?
And, im using the "Custom server side validation" and i have placed it "on submit" after "onsuccess".
first of all, thanks for a great product.
Been trying to sort out the "Restrict duplicate entry" issue for some time now, but i cant get it to work in my form, been using this code as base:
<?php
$db =& JFactory::getDBO();
$query = "
SELECT COUNT(*)
FROM `#__chronoforms_Testing`
WHERE `name` like '".$_POST['name']."';
";
$db->setQuery($query);
$count = $db->loadResult();
if ( $count ) {
global $mainframe;
$mainframe->redirect('somePageHere');
return;
}But im having trouble with the parameters, the table name i can see in the "FROM" clause, but not quite sure what goes in the other ones, can anyone break it down for me?
And, im using the "Custom server side validation" and i have placed it "on submit" after "onsuccess".
This topic is locked and no more replies can be posted.
