$host = "webdev.iyaserver.com"; $userid = "emiliedu"; $userpw = "AcadDev_Duran_3980098433"; $db = "emiliedu_movies"; // include '../pdloginvariables.php'; // you can ignore/skip this line $mysql = new mysqli( $host, $userid, $userpw, $db ); if($mysql->connect_errno) { echo "db connection error : " . $mysql->connect_error; exit(); } $title = $_REQUEST['title']; $sql = "SELECT * FROM moviesView WHERE title like 'title'"; $sql = ""; // SQL statement to submit to db $results = $mysql->query($sql); if(!$results) { echo "SQL error: ". $mysql->error; exit(); } echo "Your search returned " . $results->num_rows . " results.
"; while($currentrow = $results->fetch_assoc()) { echo "field1: " . $currentrow["title"] . "
"; // replace field1 with the name of a column from your SELECT }