I had someone create a component for me on Joomla 1.0. we used Jumi to create an "html" file with this in the top:
<? php
global $my;
if ($my->id) {
echo "<script type='text/javascript'>juserid=".$my->id."</script>";
} else { }
?>
This created a parameter that was readable by my php file: Then inside a non-Joomla php file (where we ran a query using the userid to create an XML file), we added this:
global $my;
$userid = $_POST['userid'];
In the query we used this:
where g.id=" . $userid.
This isn't working though when I tried to recreate this in J1.6. What's the new syntax for retrieving the userid and posting it so I can grab it from the other php file and use it in a query? I do not think the $POST method is secure either.
Basically what I need is a way for a php file (that is not part of the Joomla environment but on same server) to be able to retrieve the user's Joomla ID so I can use it in a query. This php file is called via a javascript file that I'm referencing inside a Jumi component.