Structure of the main file (index.php)
<?php
include('functions.inc.php');
include('page.php');
?>
In functions.inc.php file i definied a function:
function getServiceAddonButtons($product)
{
global $db;
$service = getServiceVar($product);
$svaddon = $service['svdo_addon'];
if (file_exists('content/addons/'.$svaddon.'/service_buttons/buttons.php') && addon_activated($svaddon) == 'YES') {
include('content/addons/'.$svaddon.'/service_buttons/buttons.php');
}
}
(Other functions on this file are already definied and working good)
In page.php i used this function:
<div class='buttons'>
<?php getServiceAddonButtons($_GET['service_id']); ?>
</div>
When i'm on index.php (where page.php is shown because is included)
I use url https://example.com/index.php?manage_service=1&service_id=218
THE PROBLEM: Seems like every time i'm on this page, the parameter of function getServiceAddonButtons($product)
is null, but i used $_GET['service_id']
Anyone knows how to solve the problem?