a few months ago my free server updated its php to php8 and now nothing on my results website shows up when you click a link.
http://trotdata.byethost32.com/
im assuming i need to update the php code for each serch page but ive no idea where to start and what to do. at the moment i have the following for the results search page which currently returns a blank page.
{
$Meetcode = $_GET['Meetcode'];
}
{
$searchSQL = "SELECT RaceDate, RaceNumber, RaceName, RaceDist, Track, Placing, Sorter, Horseid, Trail, Draw, Driver, Dist, Time, Comment, Prize FROM RaceTable WHERE ";
$types = array();
$types[] = $_GET['Meetcode']?"`Meetcode` LIKE '$Meetcode'":'';
$types = array_filter($types, "removeEmpty");
if (count($types) < 1)
$types[] = "`Meetcode` LIKE '$Meetcode'";
$andOr = isset($_GET['matchall'])?'AND':'OR';
$searchSQL .= implode(" {$andOr} ", $types) . " ORDER BY racedate, racenumber, Sorter, Placing ASC"; // order by title.order by title.
$searchResult = mysqli_query($searchSQL) or trigger_error("There was an error.<br/>" . mysqli_error() . "<br />SQL Was: {$searchSQL}");
if (mysqli_num_rows($searchResult) < 1)
{
$error[] = "The search term provided {$searchTerms} yielded no results.";
}
else
{
$results = array(); // the result array
echo '<table border="0" align=center width=80%>';
$last_race_number ='';
while ($row = mysqli_fetch_assoc($searchResult))
{
if($last_race_number != $row['RaceNumber'])
{
echo "<tr><th colspan='9'>". $row['RaceName'] ." - ". $row['RaceDist']." - ". $row['Track']." - ". $row['RaceDate'] ."</td></tr>";
}
echo '<tr>';
echo "<th>".$row['Placing']."</td>";
echo "<td align=left><a href='horse.html.php?Horseid=".urlencode($row['Horseid'])."'>".$row['Horseid']."</a></td>";
echo "<td>".$row['Trail']."</td>";
echo "<td>".$row['Draw']."</td>";
echo "<td align=left>".$row['Driver']."</td>";
echo "<td>".$row['Dist']."</td>";
echo "<td>".$row['Time']."</td>";
echo "<td align=left>".$row['Comment']."</td>";
echo "<td>£".$row['Prize']."</td>";
echo '</tr>';
$last_race_number = $row['RaceNumber'];
}
echo '</table>';
}
}
?>
************when i test the code i get an error for line=
$searchResult = mysqli_query($searchSQL) or trigger_error(“There was an error.
” . mysqli_error() . “
SQL Was: {$searchSQL}”);
and line=
$error[] = “The search term provided {$searchTerms} yielded no results.”;
what do i need to do to ressurect my site please??