PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Defined variable not working (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Defined variable not working


#5488
Greystoke (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Defined variable not working 9 Months, 1 Week ago Karma: 0  
Hi,

Using Joomla 2.5.6

I have a variable defined in /templates/beez_20/index.php.

If I add <?php echo $options; ?> in the index.php file there it works.

If I added <?php echo $options; ?> to the article, it does not output anything.

I tried <?php echo 'Test'; ?> in the article and it outputs Test on the article page, so DirectPHP is working.

Why isn't it seeing the variable.

Thanks
 
  The administrator has disabled public write access.

#5494
kksou (Admin)
Admin
Posts: 1676
graph
User Online Now Click here to see the profile of this user
Re:Defined variable not working 9 Months ago Karma: 27  
Hi,

That's because in your article, it doesn't know what $option is.

You can try the following:
<?php
$option = $_GET['option'];
$echo $option;
?>

and see if it works.

Regards,
/kksou
 
  The administrator has disabled public write access.



Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Links - Classes - Social Business - BPM - Web - General
Copyright © 2006-2013. kksou.com. All Rights Reserved