UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline

Unrecognized variable

Fagault Eric · ·
7:31 AM Monday, 30 January 2017
None
Hello,
I try to use a variable "$ user = $ this-> html ('html.user', $ target);" (The answer is "eric";)
This variable displays the username of the member concerned.
But when I want to use this variable in a php, it is not seen.
So to test, I wrote the hard varaible: "$ user =" eric ";" And there my php works.

Do you know why ?

Best regards.
Eric

<?php
// Username de l'ami
$utilisateur = $this->html('html.user', $target); //(Returns "eric";)
//$utilisateur = "eric"; // pour test

//ID de l'ami
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName('id'));
$query->from($db->quoteName('#__users'));
$query->where($db->quoteName('username') . ' = '. $db->quote($utilisateur));
/$db->setQuery($query);
$results = $db->loadResult();

// echo $results;
?>
The replies under this section are restricted to logged in users or users with an active subscription with us