Skip to Content Skip to Menu

How include a php into CB additional field

  • jarecki74
  • jarecki74
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
11 years 8 months ago - 11 years 8 months ago #222572 by jarecki74
Ther is possiblle some way to use php code on additional field in CB?

I try integrate rsform with CB and i need include data from rsform to cb

1 I install Sourcerer

2. I create additioan text field in CB

3. in CB field i insert code

{source}

<?php
// You can place PHP like this
$my = & JFactory::getUser();
$db = JFactory::getDBO();
if ($my->get('id'))
{
$db->setQuery("SELECT `email` FROM `#__users` WHERE `user_id`='".$my->get('id')."' LIMIT 1");
return $db->loadResult();
}


?>

{/source}

but this dont work :(
Last edit: 11 years 8 months ago by jarecki74.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum