<form name='search' method='get' action=''>
Insert the firstname
<input type='text' name='txtname'>
<input type='submit' value='search name'>
</form>
<?php
//database connect
$db=mysqli_connect("localhost","root","","mycompanyhr");
//checking database connection
if ($db==false) {
echo "Connect failed: ". mysqli_connect_error($db);
exit();
}
else {
echo "Connection successful";
}
$n=$_GET['txtname'];
$sql="select EMPNO, FIRSTNAME, LASTNAME, WORKDEPT,
PHONENO
from employee
where FIRSTNAME like '%$n%' ";
$rs=mysqli_query($db,$sql);
if($rs==false){
echo ("Query cannot be executed!<br>");
echo ("SQL Error : ".mysqli_error($db));
}
else{
echo "<table border=1>";
echo "<tr>";
echo "<td></td>";
echo "<td>Employee no</td>";
echo "<td>First name</td>";
echo "<td>Last name</td>";
echo "<td>Department</td>";
echo "<td>Phone ext</td>";
echo "</tr>";
while($rekod=mysqli_fetch_array($rs)){
echo "<tr>";
$empno=$rekod['EMPNO'];
echo "<td> <a href='delete.php?id=$empno'>
delete </a> </td>";
echo "<td>".$empno."</td>";
echo "<td>".$rekod['FIRSTNAME']."</td>";
echo "<td>".$rekod['LASTNAME']."</td>";
echo "<td>".$rekod['WORKDEPT']."</td>";
echo "<td>".$rekod['PHONENO']."</td>";
echo "</tr>";
}//end while
}//end null
echo "</table>";
?>
Or you could download here for the Malay proverbs app – https://play.google.com/store/apps/details?id=net.kerul.peribahasa English proverbs and the Malay pair Corpus Reference: Amir Muslim, 2009. Peribahasa dan ungkapan Inggeris-Melayu. DBP, Kuala Lumpur http://books.google.com.my/books/about/Peribahasa_dan_ungkapan_Inggeris_Melayu.html?id=bgwwQwAACAAJ CTRL+F to search Proverbs in English Definition in English Similar Malay Proverbs Definition in Malay 1 Where there is a country, there are people. A country must have people. Ada air adalah ikan. Ada negeri adalah rakyatnya. 2 Dry bread at home is better than roast meat home's the best hujan emas di negeri orang,hujan batu di negeri sendiri Betapa baik pun tempat orang, baik lagi tempat sendiri. 3 There's no accounting for tastes We can't assume that every people have a same feel Kepala sama hitam hati lain-lain. Dalam kehidupan ini, setiap insan berbeza cara, kesukaan, perangai, tabia
Comments
Post a Comment