Not sure I am on my laptop, an iBook running php/apache. So I am not sure where php.ini is.
Chuck On 6/24/02 3:29 PM, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: > Do you have display_errors ON in your php.ini ?? > > ---John Holmes... > > ----- Original Message ----- > From: "Chuck "PUP" Payne" <[EMAIL PROTECTED]> > To: "PHP General" <[EMAIL PROTECTED]> > Sent: Monday, June 24, 2002 3:24 PM > Subject: [PHP] Lost, need help debuggin.... > > >> Hi, >> >> I am trying to debugging this script. But, I can see what the issue is, it >> not listing errors on any of the mysql stuff but this what I see when I > view >> source.... >> >> -------------------------------------------------------------------------- > -- >> >> >> >> >> -------------------------------------------------------------------------- > -- >> >> Here is the code. >> >> -------------------------------------------------------------------------- > -- >> >> <html> >> <head> >> <title>Browse A Movie in My Movie Database</title> >> <meta name="generator" content="BBEdit 6.1.2"> >> </head> >> <body> >> >> <?php >> >> //How many should be displayed on per page >> >> $display_number = 25; >> >> //Connect to the database >> >> $db_connection = mysql_connect ('localhost', 'user', 'gateway') or die >> ('Could not connect'); >> $db_select = mysql_select_db ('media') or die ("Couldn't not access >> database"); >> >> //If we don't know how many pages there are, make that calculation. >> >> print "before the first if"; >> >> if (!isset($num_pages)) { >> >> >> // Determine the query. >> >> if(isset($letter)) { // Browsing a particular letter or the whole >> shebang? >> >> $query1 = "SELECT library.title FROM media.library WHERE library.title >> LIKE '$letter%' ORDER BY library.title ASC"; >> >> } else { >> >> $query1 = "SELECT library.title FROM media.library ORDER BY >> library.title ASC"; >> >> } >> >> //Query the database >> >> $query_result1 = @mysql_query ($query1) or die ("Could not run > query"); >> >> >> //Calculate the number of pages required. >> >> $num_results = @mysql_num_row ($query_result); >> if ($num_results > $display_number) { >> $num_pages = ceil ($num_results/$display_number); >> >> } elseif ($num_results > 0) { >> >> $num_pages = 1; >> >> } else { >> >> echo 'There are no movies in this selection'; >> >> } >> >> $start = 0; // Current at item 0 >> >> >> } >> >> if(isset($letter)) { // Browsing a particular letter or the whole shebang? >> >> $query = "SELECT library.title FROM media.library WHERE library.title >> LIKE '$letter%' ORDER BY library.title ASC LIMIT $start, $display_number"; >> >> } else { >> >> $query = "SELECT library.title FROM media.library ORDER BY > library.title >> ASC LIMIT $start, $display_number"; >> >> } >> >> >> // Table that shows movies... >> >> echo "<table align='center' cellpadding='2' cellspacing='2' border='1'>"; >> echo "<tr align='center'>"; >> echo "<td align='center'><b>Title</b></td>"; >> echo "</tr>"; >> >> // Print My list >> >> $query_result = @mysql_query ($query); >> >> while ($row = @mysql_fetch_array ($query_result)) { >> >> print "<tr align='center'>"; >> print "<td align='center'><i><a >> href='testlist.php?row[title]'>$row[title]</a></i></td>"; >> print "</tr>"; >> >> } >> >> // Make the links to others pages, if nessessary. >> >> if ($num_pages > 1) { >> >> print "<tr align='center'>"; >> print "<td align = 'center' colspan = '2'>"; >> >> // Determine what page the script is on. >> >> if ($start == 0) { >> $current_page = 1; >> >> } else { >> >> $current_page = ($start/$display_number) + 1; >> >> } >> >> // If it's not the make a back button... >> >> If($start !=0) { >> echo '<a href="browse_movie.php?start=' .($start - > $display_number) >> . '&num_pages=' . >> $num_pages . '&lettter' . $letter . '">Back</a> '; >> } >> >> // Make all the numbered pages. >> >> for ($i = 1; $i <= $num_pages; $i++) { >> $next_start = $start + $display_number; >> if ($i != $current_page) { >> >> // Don't link the current page >> >> print '<a href="browse_movie?start=' . (($display_number * > ($i-1))) >> . >> '&num_pages=' . $num_pages . '$letter=' .$letter . '">' .$i . > '</a> >> '; >> >> } else { >> >> echo $i . ' '; >> >> } >> >> } >> >> // If it's not the last page, make a next buttton. >> >> if($current_page !=$num_pages) { >> print '<a href="browse_movie?start=' . ($start + $display_number) > . >> '&num_pages=' . >> $num_pages . '&letter=' . $letter . '">Next</a> '; >> >> >> } >> >> print "</td>"; >> print "</tr>"; >> >> >> } >> >> >> ?> >> >> </table> >> </body> >> </html> >> >> >> -------------------------------------------------------------------------- > -- >> >> Thanks a head of time if you can show the error(s) in my code. >> >> Chuck Payne >> Magi Design and Support >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php