Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="show.php" method="post">
- <input type="text" value="Enter Site ID" name="a" class="textfield_effect" maxlength="30" onfocus="this.value=''">
- </td>
- </tr>
- <tr>
- <td align="center" style="font-family:Calibri">
- <input type="submit" value=""/>
- </form>
- <?php
- $con=mysqli_connect("mysql.crunkboxhost.com","CHANGED","CHANGED","CHANGED");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $a= $_POST["a"];
- $result = mysqli_query($con,"SELECT *
- FROM `datasearch`
- WHERE `TAXINAME` LIKE '$a'
- LIMIT 0 , 30");
- $query = "SELECT * FROM datasearch WHERE ID LIKE '%".$_POST['search']."%'";
- echo "<table border='1'>
- <tr>
- <th>ID</th>
- <th>Post Code</th>
- <th>Taxi Name</th>
- <th>Price per mile</th>
- <th>Rating</th>
- <th>Location</th>
- <th>Are they online?</th>
- <th>Are they busy?</th>
- </tr>";
- while($row = mysqli_fetch_array($result))
- {
- echo "<tr>";
- echo "<td>" . $row['ID'] . "</td>";
- echo "<td>" . $row['POSTCODE'] . "</td>";
- echo "<td>" . $row['TAXINAME'] . "</td>";
- echo "<td>" . $row['PRICEPERMILE'] . "</td>";
- echo "<td>" . $row['RATING'] . "</td>";
- echo "<td>" . $row['RATING'] . "</td>";
- echo "<td>" . $row['LOCATION'] . "</td>";
- echo "<td>" . $row['ONLINE'] . "</td>";
- echo "<td>" . $row['BUSY'] . "</td>";
- echo "<td>" . $row[''] . "</td>";
- echo "</tr>";
- }
- echo "</table>";
- mysqli_close($con);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement