Advertisement
Guest User

Untitled

a guest
May 24th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.39 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  4. <head>
  5.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <title>ItemDB | 842</title>
  7.     <meta name="title" content="ItemDB | 842" />
  8.     <meta name="description" content="ItemDB is a website that brings together information about RuneScape items, including the ID, to help you spend less time searching and more time gaming." />
  9.     <meta name="keywords" content="itemdb, item-db, item id list, item list, itemdatabase, runescape, rune, rs, rsps, runescape private server, runescape private servers, runescape item list, item, items, db, database, spawn, spawning, pickup, pickup codes, item codes, item id, item ids" />
  10.     <link rel="shortcut icon" href="http://www.itemdb.biz/favicon.ico" />
  11.     <link rel="apple-touch-icon" href="http://www.itemdb.biz/images/favicon.png" />
  12.     <link rel='stylesheet' type='text/css' href='http://www.itemdb.biz/style.css?v=1427673501' />
  13. <body>
  14. <div id="outerbar">
  15.       <div id="innerbar">
  16.         <form action="search.php" method="POST">
  17.           <a href="http://pernix-rsps.com"><img src="logo.png" /></a>
  18. <input name="search" type="text" placeholder="Enter Item Name.." width="400" />
  19.  
  20. <input type="Submit" value="Search Database" />
  21. <br /><br />
  22.        </form>
  23.        
  24.     </div>
  25.     </div>
  26. <center>
  27. <?php
  28.  if (!$_POST) {
  29.     include('index.php');
  30.     } else {
  31.     ?>
  32. <h1>Pernix RsPs<br />
  33.   Official ItemDB!</h1>
  34. <br />
  35. <form action="search.php" method="POST">
  36. <input type="text" name="search" /><br /><br />
  37. <input type="Submit" value="Search ItemDB" />
  38. </form>
  39.  <table border="0" width="400">
  40.   <img src="top.png"></table>
  41.   <table border="1" width="400">
  42.  <?php
  43.     $search = $_POST["search"];
  44.         MySQL_connect("localhost", "user", "password");
  45.         MySQL_select_db("db");
  46.         $result = mysql_query("SELECT * FROM items WHERE name LIKE '%" . mysql_real_escape_string($search) . "%'  ORDER by name") or trigger_error(mysql_error().$sql);
  47.  
  48. while($row = mysql_fetch_array($result))
  49.   {
  50.   ?>
  51.  
  52. <?
  53.    
  54.     echo '<tr>';
  55.     echo '<img src="post.png">';
  56.     echo '<td>' . $row['img'] . '</td>';
  57.     echo '<td>' . $row['name'] . '</td>';
  58.     echo '<td>' . $row['price'] . '</td>';
  59.    
  60.     echo '</tr>';
  61.         }
  62.     }
  63. ?>  
  64.  
  65. </table>
  66. </center>
  67.  
  68.  
  69.  
  70.  
  71.  
  72. </body>
  73. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement