I’m having issues with using the global $IN to GET variables from the URL. I’m trying to get a variable from the URL and use in a query in a template. PHP parsing is set to input.
I’ve got
<?php global $IN; ?>{exp:query sql="SELECT cat_id,cat_folder FROM exp_gallery_categories WHERE gallery_id = '{gallery_number}' AND cat_id = '<?php =$IN->GBL('album_id', 'GET');?>'"}The XML file that gets output just does a query with blank cat_id. I’ve tried setting a PHP variable to the $IN->GBL and echoing and it just never gets set to anything.
I feel like I’ve had this working on a different site in the past, am I missing something obvious? PHP 5.3.2 and EE 1.6.9.
Thanks