I dont know much about PHP so forgive my ignorance. I am trying to have a parameter value entered in the Joomla admin area to append a string to my bootstrap container class to change the page from a fixed to a fluid layout.
I am retrieving the value like this...
$conType = $this->params->get('conType','');
and then simply setting it as follows...
class="container<?php echo "$conType"; ?>
However, I was worried (knowing very little about PHP) if this was a security problem since any value could be set as $conType - is that a problem? If so, would this work instead...?
$conType = (int) $this->params->get('conType','0');
if($conType == "1")
{
$conType = "-fluid";
}
else
{
$conType = ' ';
}
And then just echo it again. Is that necessary? is there a better way?