SOLVED - Smarty Variables in PHP using $this
Posted: Fri Feb 13, 2009 7:36 pm
I'm sorry, I've researched this forum for nearly two hours. I came across a thread that was similar to what I'm trying to do, but I can't make it work.
I need two variables to be available inside the the {php} tags. The other thread mentioned using $this->name to access the variable, but that variable is blank in php for me. I'm pretty familiar with PHP, so I think either the variable doesn't exist or it's not making to the PHP code.
I need to do something along the lines of:
The include statement is working, but PHP is reporting that it couldn't include "/script/scriptname.php?varname=" without the variables that should have been added using $this->.
Can someone tell me if I need to enable something else or if I am referencing the variables correctly?
Thanks,
Doug
I need two variables to be available inside the the {php} tags. The other thread mentioned using $this->name to access the variable, but that variable is blank in php for me. I'm pretty familiar with PHP, so I think either the variable doesn't exist or it's not making to the PHP code.
I need to do something along the lines of:
Code: Select all
{php}
$url = $this->root_url . "/script/scriptname.php?varname=" . $this->customcontent_loginname;
include($url);
{/php}
Can someone tell me if I need to enable something else or if I am referencing the variables correctly?
Thanks,
Doug