Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- mysql_connect("localhost", "user", "passwordremoved") or die("Error connecting to database: ".mysql_error());
- mysql_select_db("GAL") or die(mysql_error());
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Search results</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" href="style.css"/>
- </head>
- <body>
- <?php
- $query = $_GET['query'];
- ini_set('display_errors',1);
- error_reporting(E_ALL);
- $query = mysql_real_escape_string($query);
- $raw_results = mysql_query("SELECT * FROM GALTotals
- WHERE (`IGN` LIKE '%".$query."%') ") or die(mysql_error());
- if(mysql_num_rows($raw_results) > 0){
- while($results = mysql_fetch_array($raw_results)){
- echo "<p><h3>".$results['IGN']."</h3></p>";
- }
- }
- else{
- echo "No results";
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement