لدي صفحة استعلام من قاعدة البيانات برمجتها بلغة PHP
و لكن اريد اضافة شريط البحث بها لكي أبحث بها عن اسم معين أو رقم هاتف معين .. ارجو مساعدتي ..
هذا الكود ::
بحيث ادخل أي كلمه في التكست .. يتم البحث عنها ..
كود PHP:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
$result = mysql_query("SELECT Id,name,databr,IDnum,Sex,typee,Overrate,Spl From userreg ORDER BY Id LIMIT 0, 50");
?>
<html>
<body>
<p> </p>
<p> </p>
<p> </p>
<p align="center" dir="rtl"><span lang="ar-sa"><font size="5">لوحة التحكم الخاصة
بالموقع ..</font></span></p>
<p align="center" dir="rtl"><span lang="ar-sa"><font size="5">استعلام كامل عن
الطلاب المسجلين ..</font></span></p>
<form method="POST" action="--WEBBOT-SELF--">
<p align="center" dir="rtl"><input type="text" name="T1" size="43"><span lang="ar-sa">
</span><input type="submit" value="البحث" name="B1"><span lang="ar-sa">
</span><input type="reset" value="إعادة تعيين" name="B2"></p>
</form>
<p align="center" dir="rtl"> </p>
<table border="1" width="100%" cellpadding="0" height="71" style="border-collapse: collapse">
<tr>
<td width="62" height="36">
<p align="center"><font color="#000080"><b><span lang="ar-sa">تعديل</span></b></font></td>
<td width="51" height="36">
<p align="center"><font color="#000080"><b><span lang="ar-sa">حذف</span></b></font></td>
<td width="122" height="36">
<p align="center"><font color="#000080"><b>التخصص</b></font></td>
<td width="97" height="36">
<p align="center"><font color="#000080"><b>النسبة<span lang="ar-sa">
المئوية</span></b></font></td>
<td width="84" height="36">
<p align="center"><font color="#000080"><b>نوعه<span lang="ar-sa">ا</span> </b></font></td>
<td width="106" height="36">
<p align="center"><font color="#000080"><b>الجنس</b></font></td>
<td width="125" height="36">
<p align="center"><font color="#000080"><b>رقم الهوية</b></font></td>
<td width="107" height="36">
<p align="center"><font color="#000080"><b>تاريخ الميلاد</b></font></td>
<td height="36">
<p align="center"><font color="#000080"><b>الإسم</b></font></td>
<td width="53" height="36">
<p align="center"><b><font color="#000080">الرقم </font></b>
<span lang="ar-sa"><b><font color="#000080"> التسلسلي</font></b><font color="#000080">
</font></span></td>
<?php
while($row = mysql_fetch_array($result)) {
?>
</tr>
<tr>
<td width="62" height="33" align="center">
</td>
<td width="51" height="33" align="center">
<form method="POST" action="--WEBBOT-SELF--">
<p>
<input type="checkbox" name="C1" value="ON" style="font-weight: 700"></p>
</form>
</td>
<td width="122" height="33" align="center">
<font color="#336699"><b>
<?php echo $row['Spl']; ?></b></font></td>
<td width="97" height="33" align="center">
<font color="#336699"><b>
<?php echo $row['Overrate']; ?></b></font></td>
<td width="84" height="33" align="center">
<font color="#336699"><b>
<?php echo $row['typee']; ?></b></font></td>
<td width="106" height="33" align="center">
<font color="#336699"><b>
<?php echo $row['Sex']; ?></b></font></td>
<td width="125" height="33" align="center">
<font color="#336699"><b>
<?php echo $row['IDnum']; ?></b></font></td>
<td width="107" height="33" align="center">
<font color="#336699"><b>
<?php echo $row['databr']; ?></b></font></td>
<td height="33" align="center">
<font color="#336699"><b>
<?php echo $row['name']; ?></b></font></td>
<td height="33" width="53" align="center">
<font color="#336699">
<b>
<?php echo $row['Id']; ?></b></font></td>
</tr>
<?php
}
?>
</table>
</body>
</html>