Well i think the title says it all. I really need to make the page update when there is a new table row data on mytable
added or removed. Here's my code
EDIT! : THIS IS THE CORRECT CODE
<?php
echo '
<html>
<head>
<style type="text/css">
html {
min-width: 100%;
min-height: 100%;
}
body {
font-family: Segoe UI;
font-size: 11px;
height: 277px;
background-color: transparent;
overflow-X: hidden;
overflow-y: auto;
margin-top: 5px;
}
</style>
</head>
<body OnContextMenu="return false;" OnSelectStart="return false;">';
/////////////////////////////
$odbc_dsn = "mydb";
$odbc_usr = "sa";
$odbc_pwd = "WH@tTH3!?";
/////////////////////////////
$ID = 0;
if(!isset($_GET['myid'])) { exit('Game fail!'); }
$ID = $_GET['myid'];
$conn = odbc_connect($odbc_dsn, $odbc_usr, $odbc_pwd);
if(!$conn) { die('Epic Fail!'); }
$query = odbc_exec($conn, "SELECT * FROM mytable WHERE USER_ID='$ID'");
$world = odbc_result($query, 'MAIN_CH');
$chan = odbc_result($query, 'SUB_CH');
odbc_free_result($query);
$query = odbc_exec($conn, "SELECT USER_INDEX_ID FROM mytable WHERE MAIN_CH=$world AND SUB_CH=$chan ORDER BY USER_INDEX_ID");
$chanCount = odbc_num_rows($query);
$s = "";
while($i=odbc_fetch_array($query))
$s .= $i["USER_INDEX_ID"].",";
$s = rtrim($s,",");
odbc_free_result($query);
$query = odbc_exec($conn, "SELECT USER_NICKNAME, Level, AdminLevel FROM mytable0 WHERE USER_INDEX_ID IN ($s) ORDER BY AdminLevel DESC, Level DESC, Experience");
while($i=odbc_fetch_array($query)) {
if($i['AdminLevel']==0){
echo '<font color="White">'." "."Lv.".$i['Level']." ".$i['USER_NICKNAME']." </br></br></font>";
} else {}
}
odbc_free_result($query);
odbc_close($conn);
?>
</body>
</html>
Any help or suggestions will be appreciated. Thanks in advance.