• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: 1 submission per user

1 submission per user 12 years 6 months ago #15138

Hi guys im trying to make a form which allows only 1 post per user.
i have the following code:
$database =& JFactory::getDBO();
$rsuser =& JFactory::getUser();
$user = $rsuser->get( 'id' );
$usercadena = mysql_real_escape_string($user);
$database->setQuery("SELECT COUNT(`SubmissionId`) FROM #__rsform_submissions WHERE `FormId`='8' AND `UserId`='{&usercadena}'");
$database->query();
if (intval($database->loadResult()) >= 1)
{
echo 'Ya subió este documento, sólo se puede enviar una vez !';
$formLayout = '';
}

Please tell me what im doing wrong. I converted the userid to string, as in rsform_submissions table is TEXT.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!