connect_errno) {
echo "db connection error : " . $mysql->connect_error;
exit();
}
?>
Search results
query($sql);
if(!$results) {
echo "Your SQL: " . $sql . "
";
echo "SQL Error: " . mysqli_error($conn);
exit();
}
// echo "
You searched for Title: " . $_REQUEST['title'] . " and Rating: " . $_REQUEST['rating'] . " and Genre: " . $_REQUEST['genre'] . "";
// echo "
";
// echo "
(SQL: " . $sql . ")";
// echo "
";
echo "
Your results returned " .
$results->num_rows .
" results.";
echo "
";
$start = 11;
$end = 20;
$counter = $start;
$results->data_seek($start-1);
while($currentrow = $results->fetch_assoc()) {
echo "
" .
$counter . ") " .
$currentrow['title'] .
"".
" (Rated " . $currentrow['rating'] . ")
" .
"
";
if($counter==$end){
break;
}
$counter++;
}
?>