The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Display online players
BizzyD
post Oct 13 2014, 10:17 AM
Post #1





Group: Members
Posts: 6
Joined: 14-November 13
Member No.: 19,984



Hello, I am coding a small UCP. And I want to show all the online admins. It works but I want it to show a picture instead of saying ex: Bizzy_D 1. It should be Bizzy_D PICTURE.

This is my code:

CODE
<html>
<head>
<title>Island Survival Roleplay</title>
<link href="./style/main.css" rel="stylesheet" type="text/css">

<script src="./includes/jquery-1.9.1.js" type="text/javascript"></script>

<script type="text/javascript">
</script>
</head>

<body>
<nav>
<ul>
<li><a href="./home.php"><img border="0" src="style/images/home.png"></a><a href="./logout.php"><img border="0" src="style/images/logout.png"></a></li>
</ul>
</nav>
<div class="container">
<div class="ribbon">Staff Page
</div>
<div class="defbox">
</div>
</body>
</html>


<?php
$con=mysqli_connect("localhost","root","","MyDB");

if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

$result = mysqli_query($con,"SELECT * FROM playerdata WHERE AdminLevel = 1 OR AdminLevel = 2 OR AdminLevel = 3 OR AdminLevel = 4 OR AdminLevel = 5 OR AdminLevel = 6");

while($row = mysqli_fetch_array($result))
  {
  echo $row['username'] . " " . $row['online_ig'];
  echo "<br>";
  }

mysqli_close($con);
?>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th June 2024 - 06:02 AM