RE: [PHP-DB] Where's the error?
It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Where's the error?
If you view source on the page that's displaying nothing, is there any HTML code there? If so, search through it and let us know if there's a PHP error buried in the HTML code somewhere. -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:56 PM To: 'Edward Peloke'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Where's the error?
Not even the title?!?! Dan On Apr 8, 2004, at 2:55 PM, [EMAIL PROTECTED] wrote: It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Where's the error?
Nothing, htmlbody/body/html I just found this in the error log: PHP Parse Error: parse error, unexpected $ in catalog.html on line 74 This is the last line of the whole file... Guessing I have a curly brace not closed somewhere??? -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:01 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? If you view source on the page that's displaying nothing, is there any HTML code there? If so, search through it and let us know if there's a PHP error buried in the HTML code somewhere. -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:56 PM To: 'Edward Peloke'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Where's the error?
I think you're right, Robert. Hopefully, your editor has a Match Brace feature or something similar so you don't have to search manually. You also might want to raise your level of error reporting in your PHP.ini file so, in your testing environment, those errors get spit out to the browser. It'll save you some time searching around. Up to you though (obviously). Happy hunting! ;) -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:05 PM To: 'Hutchins, Richard'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? Nothing, htmlbody/body/html I just found this in the error log: PHP Parse Error: parse error, unexpected $ in catalog.html on line 74 This is the last line of the whole file... Guessing I have a curly brace not closed somewhere??? -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:01 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? If you view source on the page that's displaying nothing, is there any HTML code there? If so, search through it and let us know if there's a PHP error buried in the HTML code somewhere. -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:56 PM To: 'Edward Peloke'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Where's the error?
OK... I had double checked when I put in each new line of code (it's an old page I was modifying today for a new task) and I know I double-checked that I put in the right and left curly braces around the new stuff. Somehow I lost an ending one... How the heck do you miss 1 curly brace in a mile of them??? I feel like a fool.. Oh well.. Does anyone have a GOOD static page generation script that I can use to parse this file and create the static pages that it will link to? Thanks for the help! Robert -Original Message- From: Dan Brunner [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:03 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Where's the error? Not even the title?!?! Dan On Apr 8, 2004, at 2:55 PM, [EMAIL PROTECTED] wrote: It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Where's the error?
If only to have a testing server... *sigh* maybe next budget meeting I can squeak an old box out of them to turn into one.. :) I fired up nedit on the server and looked at the file, danged thing pinged out the error in like 3 seconds when I hit the last curly brace before the ?. Was missing one of the durn things.. Robert -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:10 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? I think you're right, Robert. Hopefully, your editor has a Match Brace feature or something similar so you don't have to search manually. You also might want to raise your level of error reporting in your PHP.ini file so, in your testing environment, those errors get spit out to the browser. It'll save you some time searching around. Up to you though (obviously). Happy hunting! ;) -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:05 PM To: 'Hutchins, Richard'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? Nothing, htmlbody/body/html I just found this in the error log: PHP Parse Error: parse error, unexpected $ in catalog.html on line 74 This is the last line of the whole file... Guessing I have a curly brace not closed somewhere??? -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 4:01 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? If you view source on the page that's displaying nothing, is there any HTML code there? If so, search through it and let us know if there's a PHP error buried in the HTML code somewhere. -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:56 PM To: 'Edward Peloke'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? It is not displaying anything at all. -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 3:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Where's the error? does the page actually error or does it not do anything? -Original Message- From: Robert Sossomon [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Where's the error? I have this script which SHOULD produce a linked webpage for soon-to-be created static web pages, however I can't seem to find the error in my code: ?php //connect to database include 'db.php'; $display_block = h1PFS Sales Categories/h1 PSelect a category to see its items./p; //Show categories first $get_cats = select id_num, id_name, description, cat_code from PFS_categories order by id_name; $get_cats_res = mysql_query($get_cats) or die(mysql_error()); if (mysql_num_rows($get_cats_res) 1) { $display_block = PemSorry, no categories to browse./em/P; } else { while ($cats = mysql_fetch_array($get_cats_res)) { $cat_id = $cats[id_num]; if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 || $cat_id != 117 || $cat_id != 118) { $cat_title = strtoupper(stripslashes($cats[id_name])); $cat_desc = stripslashes($cats[description]); $display_block .= stronga href=$_SERVER[PHP_SELF]?cat_id=$cat_id$cat_title $cat_desc/a/strongbr\n; if ($_GET[cat_id] == $cat_id) //get items { $get_items = select id, item_num, description from PFS_items where cat_code = $cat_id; $get_items_res = mysql_query($get_items) or die(mysql_error()); if (mysql_num_rows($get_items_res) 1) { $display_block = PemSorry, no Items to browse./em/P\n; } else { # $display_block .= ul\n; while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $item_num = $items[item_num]; $item_desc = stripslashes($items[description]); if ($item_num != ABC-R37 || $item_num != ABC-R42 || $item_num != HB-99100 || $item_num != RO-PUMPS || $item_num != ML-HDGALJUG || $item_num != PFS-CAC21 || $item_num != PFS-CO2) { $display_block .= nbsp;nbsp;nbsp;nbsp;emstronga href=\catalog/$item_id.html\$item_num/strong - $item_desc/embr\n; } } # $display_block .= br\n; # $display_block .= /ul\n; }} } } ? HTML HEAD TITLECategories of Items/TITLE BODY ?php include(nav/top_nav.html); ? ?php include(nav/side_nav.html); ? !--START PAGE CONTENT HERE-- ?php print $display_block; ? !--END PAGE CONTENT HERE-- ?php include(nav/bottom_nav.html); ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database