Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $link = mysql_connect('localhost', 'root', 'password');
- if (!$link) {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("ct366", $link);
- $criteria = $_GET[partial];
- //$sql = "select * from hf_tag where keyword like '%$criteria%'";
- $sql = "select * from real_estate where name = '$criteria'";
- //echo "$sql";
- $result = mysql_query( $sql, $link );
- //echo "$result";
- while( $myrow = mysql_fetch_row($result) )
- {
- $bedrooms = "<tr><td>$myrow[1]</td></tr>";
- $bathrooms = "<tr><td>$myrow[2]</td></tr>";
- $price = "<tr><td>$myrow[3]</td></tr>";
- }
- mysql_close($link);
- //echo $bedrooms;
- echo $bathrooms;
- echo $price;
- ?>
Add Comment
Please, Sign In to add comment