connect_errno) { echo "db connection error : " . $mysql->connect_error; exit(); } // end of database connection code ?> Movie output sample

Sample page of movie results

query($sql); if(!$results) { echo "SQL error: ". $mysql->error . " running query
" . $sql . "
"; exit(); } else { // put sql into comment block of webpage echo ""; } /* Note: $results is a database "result set". It has a property $results->num_rows that is a number (how many rows of data) */ // end of database query code ?> fetch_assoc(); echo "

List of returned fields/columns from $results:"; echo "
"; echo "
";		
print_r($sample);
echo "

"; $results->data_seek(0); // reset results // close php block ?> Returning num_rows ?> Movies
fetch_assoc() ) { // OPEN/active php loop // while in repeating loop, back into html mode ?> Movie , Rated ()