Hi All,
I'm trying to create a common connection that lists all entries for one particular user. I've tried to use the WHERE section to accomplish this as follows:
I am passing the variables to the script via appending a
However it doesn't function as I expected - I have the following code in the header section:
It appears that it cannot retrieve the data as passed in via php - is there anything stopping it reading variables via $_GET? Or is there some other way to acheive this functionality using the connector?
I'm trying to create a common connection that lists all entries for one particular user. I've tried to use the WHERE section to accomplish this as follows:
<?php
if((!isset($_GET['name'])) || (!isset($_GET['surname'])))
{
echo "Invalid Parameters";
die();
}
else
{
$name = $_GET['name'];
$surname = $_GET['surname'];
}
echo "WHERE 'name' = '<?php echo $name; ?>' AND 'surname' = '<?php echo $surname; ?>' ";
?>
I am passing the variables to the script via appending a
?name=John&surname=Citizen
to the end of the connector URL.However it doesn't function as I expected - I have the following code in the header section:
<?php
$user =& JFactory::getUser();
if(!$user->aid == 2)
{
echo "Invalid Permissions";
die();
}
?>
<h1>Member Details</h1>
<h3>{name} {surname}</h3>
?>
It appears that it cannot retrieve the data as passed in via php - is there anything stopping it reading variables via $_GET? Or is there some other way to acheive this functionality using the connector?