I have a script called ranking.php. I call this script at the top of another script (headtohead.php) as follows:
include("ranking.php");
Within the ranking script, there is a function called ‘win’. In the headtohead.php script, I have a function with the following:
global $form, $database, $foottour, $ranking;
And then within the function itself:
$newHomePoints = $ranking->win($homePoints, $homescore, $awayscore, ($homeStar - $awayStar));
I am getting the error saying that the function ‘win’ on the line where it’s called is unknown?
$ranking->win(...)is calling a method on an object. Is thewinfunction inranking.phpactually a method within a class? If it’s a standalone function then you have to call it as a standalone function.