Who have Player Logs php scripts? i have PDO but i need ODBC ^^
thanks a lot if someone sharing thanks
thanks a lot if someone sharing thanks
<?php
$host = '127.0.0.1';
$user = 'Shaiya';
$pass = 'Shaiya123';
$conn = [MENTION=311501]ODB[/MENTION]c_connect("Driver={SQL Server};Server=$host", $user, $pass) or die("Database Connection Error!");
$CharName = $_POST['CharName'];
if (isset($_POST['submit'])) {
$res = odbc_exec($conn,"
select
c.CharName
,cl.*
from
[PS_GameLog].[dbo].[ActionLog] cl
inner join PS_GameData.dbo.Chars c
on cl.CharID = c.CharID
where 1=1
and c.CharName = '$CharName' -- charname here in ''
-- and ChatTime like '%okt 9%'
");
if (odbc_num_rows($res) == 0) {
echo 'DAMN! error!!.';
}
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
echo '<div class="content">
<table class="table"><thead><tr>
<th>Character</th>
<th>Map</th>
<th>Level</th>
<th>Date</th>
<th>Log1</th>
<th>Log2</th>
<th>Log4</th></tr></thead>';
while ($Row = odbc_fetch_array($res)) {
echo '<tbody><tr><td>' . $Row['CharName'] . '</td>
<td>' . $Row['MapID'] . '</td>
<td>' . $Row['CharLevel'] . '</td>
<td>' . $Row['ActionTime'] . '</td>
<td>' . $Row['Text1'] . '</td>
<td>' . $Row['Text2'] . '</td>
<td>' . $Row['Text4'] . '</td>
</tr>';
}
echo ' </tbody></table>';
echo '</form></div>';
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1254" />
</head>
<font face="Trebuchet MS">
<center><body><br /><br />
<b>Character Log</b>
<form action="<?php
echo $_SERVER['PHP_SELF'];
?>" method="POST">
<table>
<tr><td>Char Name:</td><td><input type="text" name="CharName"/></td></tr>
</table>
<br></br>
<p><input type="submit" value="Search" name="submit" class="button" /></p>
</form>
</body></center>
</html>
wow thanks master ^.~Quote:
PHP Code:<?php
$host = '127.0.0.1';
$user = 'Shaiya';
$pass = 'Shaiya123';
$conn = [MENTION=311501]ODB[/MENTION]c_connect("Driver={SQL Server};Server=$host", $user, $pass) or die("Database Connection Error!");
$CharName = $_POST['CharName'];
if (isset($_POST['submit'])) {
$res = odbc_exec($conn,"
select
c.CharName
,cl.*
from
[PS_GameLog].[dbo].[ActionLog] cl
inner join PS_GameData.dbo.Chars c
on cl.CharID = c.CharID
where 1=1
and c.CharName = '$CharName' -- charname here in ''
-- and ChatTime like '%okt 9%'
");
if (odbc_num_rows($res) == 0) {
echo 'DAMN! error!!.';
}
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
echo '<div class="content">
<table class="table"><thead><tr>
<th>Character</th>
<th>Map</th>
<th>Level</th>
<th>Date</th>
<th>Log1</th>
<th>Log2</th>
<th>Log4</th></tr></thead>';
while ($Row = odbc_fetch_array($res)) {
echo '<tbody><tr><td>' . $Row['CharName'] . '</td>
<td>' . $Row['MapID'] . '</td>
<td>' . $Row['CharLevel'] . '</td>
<td>' . $Row['ActionTime'] . '</td>
<td>' . $Row['Text1'] . '</td>
<td>' . $Row['Text2'] . '</td>
<td>' . $Row['Text4'] . '</td>
</tr>';
}
echo ' </tbody></table>';
echo '</form></div>';
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1254" />
</head>
<font face="Trebuchet MS">
<center><body><br /><br />
<b>Character Log</b>
<form action="<?php
echo $_SERVER['PHP_SELF'];
?>" method="POST">
<table>
<tr><td>Char Name:</td><td><input type="text" name="CharName"/></td></tr>
</table>
<br></br>
<p><input type="submit" value="Search" name="submit" class="button" /></p>
</form>
</body></center>
</html>