$dbsize) { $errorcheck = n; } $film = @mysql_query("SELECT * FROM `testTJG2` WHERE `reel` = $filmnumber",$dbcnt) or die('Search failed; try again later or contact the webmaster. (3)'); } elseif (!empty($filmtitle)) { $film = @mysql_query("SELECT * FROM `testTJG2` WHERE `title` = $filmtitle",$dbcnt) or die('Search failed; try again later or contact the webmaster. (4)'); } else { $film = @mysql_query("SELECT * FROM `testTJG2` WHERE `url` = $filmfilename",$dbcnt) or die('Search failed; try again later or contact the webmaster. (5)'); } if ($errorcheck != a) { echo "There aren't that many films! Search for a lower number."; } else { $result = @mysql_fetch_array($film); //Declaring the variables to put on the page. $num = $result["id"]; //Declaring the variables to put on the page. I just pulled out (in segmented fashion) //the entire entry in the table for flexibility reasons. $reelnum = $result["reel"]; $title = $result["title"]; $length = $result["time"]; $date = $result["date"]; $notes1 = $result["notes1"]; $notes2 = $result["notes2"]; //Deprecated stuff, left here to provide context for whatever leftover bits might be floating around in the database. // $desc = $result["description"]; // $copyright = $result["copyright"]; // $gauge = $result["gauge"]; // $stocktype = $result["stocktype"]; // $color = $result["color"]; // $sound = $result["sound"]; //Displaying results, formatted. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $lengthnum = strtok($length,"min"); //These pull out filename-related variables that we use to get a whole bunch of stuff //dynamically (images, descriptions, and movie links). $filename = $result["url"]; $firstnum = $filename{0} + 1; $firstchar = (string) $firstnum; //This bit here finally prints out what we want. Heather, feel free to make the formatting nicer. if (!empty($result)) { echo ('

'.$title.'


'.$filename.'.mpg '.$filename.'.mp4

'.$date.'
Length: '.$lengthnum.' minutes

Comments:
'.$notes1.'
'.$notes2.'

Description:
'); if(@file("commentpages/".$filename.".html")) { include ("commentpages/".$filename.".html"); } else { echo "None yet."; } echo ('

Mpeg video: '.$filename.'.mpg
Mpeg layer 4 video: '.$filename.'.mp4
'); //Conditional on something, if we want more: //
// '.$filename.'.mpg // '.$filename.'.mp4 } else { echo ('Trouble! The script encountered an error. Please try again or contact the webmaster.'); } } ?>