Gifari Industries - BD Cyber Security Team
Home
/
home
/
decohaslibrary
/
public_html
/
✏️
Editing: nurse_search.php
<!doctype html/> <html xmlns = "http://www.DECOHAS.ac.tz"> <head> <meta http-equiv = "Content-Type" content = "text/html; charset=utf-8"/> <title>DECOHAS Library System</title> <link rel = "stylesheet" type ="text/css" href = "css/style.css"/> </head> <body> <div id = "container"> <div id="header" > </div> <div id ="bg_wrapper" > <h1 style="font-size:28px;">DECOHAS Online Library System<h1> </div> <div id ="wrapper"> <div class = "navbar"> <ul> <li><a href = "member.php"><img src = "images/home.gif" style="margin-right:3px; background:white;">Home</img></a></li> <li></li> <li><a href = "changepassm.php"><img src = "images/my_account.png" style="margin-right:3px;">Update password</img></a></li> <li><a href = "index.php"><img src = "images/logout.png" style="margin-right:3px;">Logout</img></a></li> </ul> </div> <div style = "margin-top:15px;"> <form action = "nurse_search.php" method = "get"> <input type = "text" name = "k" size="50" value = "<?php echo $_GET['k'];?>" style = "padding:6px; margin-left:18px;border:2px solid black;"/> <input type = "submit" value ="search" style = "padding:6px;"/> </form> </div> <?php $i = ''; $k = $_GET['k']; $terms =explode(" ",$k); $query = "SELECT * FROM nursing_book WHERE "; foreach($terms as $each){ $i++; if($i == 1) $query .= "image LIKE '%$each%'"; else $query .= " OR image LIKE '%$each%'"; } //echo $query; include 'sql.php'; $query = mysql_query($query); $numrows = mysql_num_rows($query); if($numrows>0){ while($row = mysql_fetch_assoc($query)){ //$image = $row['image']; //$message = $row['message']; //$other = $row['other']; //$imagename =$row['imagename']; ?> <div style = "margin-top:10px;"> <div style=" margin-top:0px;"> <b ><a href="books/<?php echo $row['image']?>"style="text-decoration:none; font-size:17px; color:blue; margin-left:20px; " target="source"><?php echo $row['message'] ?> <br/></a></b> <div style="margin-left:20px; padding:4px;"> <?php echo $row['other']?> </div> <iframe name="source" src="" width="99%" height="100%" frameborder = "0"></iframe> </div> </div> <?php } }else echo "no data found"; ?> </div> </div> </body> </html>
💾 Save
❌ Cancel