Hi need help with this code. i get a the error msg
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result
but dont know were to change. my connection is fine????
<?php
include ("connect.php");
// max display per page
$per_page = 5;
// get start variable
$start = $_GET ['start'];
// count record
$record_count = mysql_num_rows (mysql_query("SELECT * FROM flats"));
//count max pages
$max_pages = $record_count / $per_page; // may come out as a decimal
if (!start)
$start = 0;
// display data
$get = mysql_query("SELECT * FROM flats LIMIT $start, $per_page");
while ($row = mysql_fetch_assoc($get))
{
// get data
$select= $row['type'];
$title= $row['title'];
$location= $row['location'];
echo "<div><b>$title</b></div>";
echo "<br>";
echo "$select";
echo "<br>";
echo "$rent";
echo "<br>";
echo "$location";
}
?>