Ik heb in een map genaamd Config een functie staan om afbeeldingen met naam en url te laden
In een ander bestand totaal ergens anders op de website include ik dat bestand en roep ik de functie aan, alleen de 4 variabelen die in die functie zitten kan ik niet lezen. Wie heeft de oplossing???
Hier het stukje code van de function:
function getClublogo($Ytid, $Yuid) {
global $imgThuis;
global $imgUit;
global $naamThuis;
global $naamUit;
$sqlThuis = "SELECT * FROM `clublogos` WHERE `club_id` = $Ytid";
$resThuis = mysqli_query($dbcon00, $sqlThuis);
if (mysqli_num_rows($resThuis) > 0) {
// output data of each row
while($rowThuis = mysqli_fetch_assoc($resThuis)) {
$imgThuis = $rowThuis['logo_url'];
$naamThuis = $rowThuis['clubnaam'];
}
}
//------------------------------------------------------------------//
$sqlUit = "SELECT * FROM `clublogos` WHERE `club_id` = $Yuid";
$resUit = mysqli_query($dbcon00, $sqlUit);
if (mysqli_num_rows($resUit) > 0) {
// output data of each row
while($rowUit = mysqli_fetch_assoc($resUit)) {
$imgUit = $rowUit['logo_url'];
$naamUit = $rowUit['clubnaam'];
}
}
}
En hier de code voor het terug halen:
include("Config/afbeeldingen.php");
$th = '15';
$ui = '64';
getClublogo($th, $ui);
echo '<br><br>Club ' .$naamThuis. ' (<img src="' .$Ssite. '/'.$imgThuis. '" width="75"> )<br>' ;
echo 'Club ' .$naamUit. ' (<img src="' .$Ssite. '/'.$imgUit. '" width="75"> )<br>' ;
Als ik de functie qua code kopieƫr en plak in de originele broncode dan doet ie het heel keurig...