Hello,
Sorry my english is bad.
I want to compare the value entered by the user with the value that is in the database.
If he put the correct value, I said, your file is ready, otherwise your file is being processed
I have two tables
fabrik_dossier I stock corrects values
fabrik_users_records the value entered by the user
I tried this code in PHP Validation of the elements, but I have a message failure
$pc = JRequest::getVar('fabrik_users_records___numero_entree');
if (empty($pc)){return true;}
else{
$dbc =&JFactory::getDBO();
$dbc->setQuery("SELECT numero_dossier from fabrik_dossier WHERE numero_dossier='{$pc}'");
$pcc = $dbc->loadResult();
if ($pc = $pcc){return true;}}
Thank you
Sorry my english is bad.
I want to compare the value entered by the user with the value that is in the database.
If he put the correct value, I said, your file is ready, otherwise your file is being processed
I have two tables
fabrik_dossier I stock corrects values
fabrik_users_records the value entered by the user
I tried this code in PHP Validation of the elements, but I have a message failure
$pc = JRequest::getVar('fabrik_users_records___numero_entree');
if (empty($pc)){return true;}
else{
$dbc =&JFactory::getDBO();
$dbc->setQuery("SELECT numero_dossier from fabrik_dossier WHERE numero_dossier='{$pc}'");
$pcc = $dbc->loadResult();
if ($pc = $pcc){return true;}}
Thank you