Hi all,
I’m trying to amend some code and trying what i know to make it work. but i’m just getting a white page atm. I’ve checked over the couple files i’ve got with my limited understanding of php and finding the new part wont output right.
The code below, if I remove everything from the else up it works fine. But I’d like to have the report link output the information into a defined table(which isn’t coded here fully).
[php]<?php
include_once ‘connect2.php’;
if(isset($action) && $action == ‘showRecord’)
{
// Show full report
$matchid = $_GET[‘matchid’];
$title = “Show match report”;
include_once ‘headerm.php’;
$resulta = mysql_query(“SELECT matchid,home,away,day,month,year,time,ampm,winloss,scorehome,scoreaway,matchtype,gamemode,gamepreset,gamepack,map1,map2,map3,map4,rule1,rule2,rule3,rule4,rule5,report,complete FROM ukematch WHERE matchid=$matchid”);
list($matchid,$home,$away,$day,$month,$year,$time,$ampm,$winloss,$scorehome,$scoreaway,$matchtype,$gamemode,$gamepreset,$gamepack,$map1,$map2,$map3,$map4,$rule1,$rule2,$rule3,$rule4,$rule5,$report,$complete) = mysql_fetch_array($resulta);
?>
UKE Match Admin Page
Welcome to the admin page for the UKE Matches. From here you can update the details of the matches we have finished and awaiting to happen.
Please if you change this, post into the admin chat on forums to let me know.
Thanks
UKE Admin Team
Home | Away | W/L | Home Score | Away Score | Match Complete | \n"; echo "|
$home | \n"; echo "$away | \n"; echo "$winloss | \n"; echo "$scorehome | \n"; echo "$scoreaway | \n"; echo "$complete | \n"; echo "Report | "; echo "
UKE Match Admin Page
Welcome to the admin page for the UKE Matches. From here you can update the details of the matches we have finished and awaiting to happen.
Please if you change this, post into the admin chat on forums to let me know.
Thanks
UKE Admin Team
echo “
<table width=“75%” cellpadding=“6” align=“center”>\n”;
echo “
echo “<tr height=“2”><td colspan=“6”>
\n”;
while ($row = mysql_fetch_array($sql))
{
list($matchid,$home,$away,$day,$month,$year,$time,$ampm,$winloss,$scorehome,$scoreaway,$complete) = $row;
// Images for status...
// Put images in the same directory as this file...
$onlineImage = "greenfinal.gif"; // Replace image.png with the name of the image
$offlineImage = "redfinal.gif"; // Replace image.png with the name of the image
$workImage = "yellow.jpg"; // Replace image.png with the name of the image
$winlossImage = "";
if ($winloss == 'Win') { $winlossImage = $onlineImage; $winlossColor="#00dd00"; }
if ($winloss == 'Loss') { $winlossImage = $offlineImage; $winlossColor="#dd0000"; }
if ($winloss == 'Draw') { $winlossImage = $workImage; $winlossColor="#dddd00"; }
if ($home == 'UKE') {$homeColor="00dd00";}
if ($home != 'UKE') {$homeColor="dd0000";}
if ($away == 'UKE') {$awayColor="00dd00";}
if ($away != 'UKE') {$awayColor="dd0000";}
echo " <tr>\n";
echo " <tr>\n";
echo " <td><font color=\"$homeColor\">$home</font></td>\n";
echo " <td><font color=\"$awayColor\">$away</font></td>\n";
echo " <td><font color=\"$winlossColor\">$winloss</font></td>\n";
echo " <td>$scorehome</td>\n";
echo " <td>$scoreaway</td>\n";
echo " <td>$complete</td>\n";
echo " <td align=\"center\"><a href=\"admin.php?action=showRecord&matchid=$matchid\">Report</a></td>";
echo " </tr>\n";
}
echo “<tr height=“2”><td colspan=“6”>
\n”;
echo “\n”;
include_once ‘upcomming.php’;
include_once ‘footer.php’;
?>[/php]