Cussed
Member
[Help] جستجو و یافتن !
سلام خدمت اساتید محترم .
دوستان من یک مشکلی داشتم .
به این کد توجه کنید
من میخوام که این کد رو تبدیل کنم به یک کدی که فقط با جستجو پیدا بشه ! ولی الان با این کد وقتی کسی ban میشه Automatic وارد لیست میشه من میخوام که فقط یک قسمت سرچ درست کنم که وقتی username رو وارد کرد بگه که این Username در لیست جریمه ها موجود است ! و برعکس !
لطفا کمک کنید !
سلام خدمت اساتید محترم .
دوستان من یک مشکلی داشتم .
به این کد توجه کنید
PHP:
// You Should Write here your MySQL Server information !
$host = 'localhost' ; // Host adress
$user = 'root' ; //Username
$password = 'majidonline' ; //Password
$realmdb = 'realmd' ; // the name of realmd database
?><body bgcolor="#000000">
<center>
<table width="587" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="583"><img src="/Untitled-2.gif" width="579" height="150"></td>
</tr>
</table>
<img src="/Untitled-1.gif" width="579" height="36"><br>
</center>
<table width="579" border="1" align="center">
<tr>
<td width="901" height="169" valign="top" bgcolor="#000000"><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="459" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="457" bgcolor="#999999"><?php
// You Should Write here your MySQL Server information !
echo "<center><table border=7 ><tr><th>شماره اکانت :</th><th>نام کاربری :</th><th>دلیل جریمه شدن :</th><th>زمان جریمه شدن</th><th>زمان خارج شدن</th></tr>" ;
$connection = mysql_connect ( $host , $user , $password ) or die ( "Can't connect with $host" );
mysql_select_db ( $realmdb , $connection );
$sqle = "SELECT `id`,`banreason`, `bandate`, `unbandate` FROM `account_banned`" ;
$sql = "SELECT `ab`.*, `a`.`username` FROM `account_banned` as `ab` "
. "LEFT JOIN `account` as `a` ON `a`.`id` = `ab`.`id`;" ;
$result = mysql_query ( $sql , $connection );
while ( $vystup = mysql_fetch_array ( $result ))
{
echo "<tr><td align=\"center\">" . $vystup [ "id" ]. "</td>" ;
echo "<td align=\"center\">" . $vystup [ "username" ]. "</td>" ;
echo "<td align=\"center\">" . $vystup [ "banreason" ]. "</td>" ;
echo "<td align=\"center\">" . date ( "dmY H:m" , $vystup [ "bandate" ]). "</td>" ;
echo "<td align=\"center\">" . date ( "dmY H:m" , $vystup [ "unbandate" ]). "</td>" ;
echo "</tr>" ;
}
mysql_close ( $connection );
echo "</table></center>" ;
?></td>
</tr>
</table>
<p><br>
</p></td>
</tr>
</table>
<p> </p>
لطفا کمک کنید !
آخرین ویرایش: