I am trying to use JFactory in Joomla to get a user's name. Then I want to use PHP to fetch their information from a MySQL table. However, I can't even use simple HTML. Using my example below, all HTML is ignored. How do I get it to recognize the HTML? The website is: http://freecpr.org/index.php/training/first-aid-cpr-aed-online
My code is:
{source}
$user = JFactory::getUser();
<?php
if($user->id!=0){
echo "{$user->name}";
echo "<br />";
echo "First Aid | CPR | AED: ";
echo "<br />";
echo "Bloodborne Pathogens: ";
}
else{
echo "Please Log In";
}
?>
{/source}
<hr />
<h1>Under Construction</h1>
</div>