connect_errno) { echo "db connection error : " . $mysql->connect_error; exit(); } ?> Movie search

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 "

"; if(empty($_REQUEST["start"])) { $start=1; } else { $start = $_REQUEST["start"]; } $end = $start + 9; if ($results->num_rows < $end) { $end = $results->num_rows; } $counter = $start; $results->data_seek($start-1); // echo "
" . $searchstring . "
"; if($start != 1) { ?>
"> "> "> ">
num_rows) { ?>
"> "> "> ">

"; while($currentrow = $results->fetch_assoc()) { echo "
" . $counter . ") " . $currentrow['title'] . "". " (Rated " . $currentrow['rating'] . ")
" . "
"; if($counter==$end){ break; } $counter++; } ?>