Advertisement
Guest User

Untitled

a guest
Jun 14th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. <form action="show.php" method="post">
  2. <input type="text" value="Enter Site ID" name="a" class="textfield_effect" maxlength="30" onfocus="this.value=''">
  3. </td>
  4. </tr>
  5. <tr>
  6. <td align="center" style="font-family:Calibri">
  7. <input type="submit" value=""/>
  8. </form>
  9.  
  10.  
  11. <?php
  12. $con=mysqli_connect("mysql.crunkboxhost.com","CHANGED","CHANGED","CHANGED");
  13. // Check connection
  14. if (mysqli_connect_errno())
  15. {
  16. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  17. }
  18.  
  19. $a= $_POST["a"];
  20. $result = mysqli_query($con,"SELECT *
  21. FROM `datasearch`
  22. WHERE `TAXINAME` LIKE '$a'
  23. LIMIT 0 , 30");
  24. $query = "SELECT * FROM datasearch WHERE ID LIKE '%".$_POST['search']."%'";
  25.  
  26. echo "<table border='1'>
  27. <tr>
  28. <th>ID</th>
  29. <th>Post Code</th>
  30. <th>Taxi Name</th>
  31. <th>Price per mile</th>
  32. <th>Rating</th>
  33. <th>Location</th>
  34. <th>Are they online?</th>
  35. <th>Are they busy?</th>
  36. </tr>";
  37.  
  38. while($row = mysqli_fetch_array($result))
  39. {
  40. echo "<tr>";
  41. echo "<td>" . $row['ID'] . "</td>";
  42. echo "<td>" . $row['POSTCODE'] . "</td>";
  43. echo "<td>" . $row['TAXINAME'] . "</td>";
  44. echo "<td>" . $row['PRICEPERMILE'] . "</td>";
  45. echo "<td>" . $row['RATING'] . "</td>";
  46. echo "<td>" . $row['RATING'] . "</td>";
  47. echo "<td>" . $row['LOCATION'] . "</td>";
  48. echo "<td>" . $row['ONLINE'] . "</td>";
  49. echo "<td>" . $row['BUSY'] . "</td>";
  50. echo "<td>" . $row[''] . "</td>";
  51. echo "</tr>";
  52. }
  53. echo "</table>";
  54. mysqli_close($con);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement