From 3795c6d3b35b59a591c39cee8832e60a6c7b1857 Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Sat, 10 Jun 2017 01:30:47 -1000 Subject: [PATCH] trying to keep profession background color consistent --- gw-history.php | 2 ++ gw-toon.php | 1 + 2 files changed, 3 insertions(+) diff --git a/gw-history.php b/gw-history.php index 6153974..8fa7a6e 100644 --- a/gw-history.php +++ b/gw-history.php @@ -12,6 +12,7 @@ include_once 'gw-connect.php'; $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); //$cnameid = mysqli_real_escape_string($con, $_POST['cnameid']); //need to sanitize & validate this input somehow $cnameid = $_SESSION['playerid']; +$profcolor = $_SESSION['profcolor']; if ($con->connect_errno > 0){ die ('Unable to connect to database [' . $db->connect_errno . ']'); } @@ -20,6 +21,7 @@ if (!$result = $con->query($sql)){ die ('There was an error running the query [' . $con->error . ']'); } if (mysqli_num_rows($result) > 0) { + echo ''; while ($row = $result->fetch_array()){ echo 'On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and '; if ($row['itemtype'] == 16) { //this would be a rune diff --git a/gw-toon.php b/gw-toon.php index d2eb84a..7507dbe 100644 --- a/gw-toon.php +++ b/gw-toon.php @@ -41,6 +41,7 @@ if (!$_SESSION['userid']){ while ($row2 = $result2->fetch_array()){ $charactername = $row2['charname']; $profcolor = $row2['profcolor']; + $_SESSION['profcolor'] == $profcolor; echo '' . $charactername . ''; echo ''; }