Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4564558
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:31:06+00:00 2026-05-21T18:31:06+00:00

Ok so I’ve got this piece of offending code: <!– Begin the Product Group

  • 0

Ok so I’ve got this piece of offending code:

<!-- Begin the Product Group Submenu -->
                       <ul>
<?php do  { ?> 
    <li><a href="prodgrouppg.php?groupid=<?php echo $row_menugroup['GroupID']; ?>&amp;groupname=<?php echo $row_menugroup['GroupName']; ?>"><?php echo $row_menugroup['GroupName']; ?></a>

<!-- Retrieve the individual products related to the Group -->                               
<?php                               
$groupprod_menuprod = "-1";
if (isset($row_menugroup['GroupID'])) {
  $groupprod_menuprod = (get_magic_quotes_gpc()) ? $row_menugroup['GroupID'] :     addslashes($row_menugroup['GroupID']);
}
mysql_select_db($database_conn_atex, $conn_atex);
$query_menuprod = sprintf("SELECT products.ProductID, products.ProductName,     products.ProductGroup FROM products WHERE products.ProductGroup=%s ORDER BY products.ProductName", GetSQLValueString($groupprod_menuprod, "int"));
$menuprod = mysql_query($query_menuprod, $conn_atex) or die(mysql_error());
$row_menuprod = mysql_fetch_assoc($menuprod);
$totalRows_menuprod = mysql_num_rows($menuprod);
?>

<!-- Begin the product submenu (final menu) -->

<ul>
<? $row_menuprod = mysql_fetch_assoc($menuprod)) 
{
    echo 
    <li>
        <a href="productpg.php?prodid=<?php echo $row_menuprod['ProductID']; ?>">
            <? echo $row_menuprod['ProductName']; ?>
        </a>
    </li>
    </ul> <!-- end of Product Submenu -->
    </li>
         <?php } while ($row_menugroup = mysql_fetch_assoc($menugroup)); ?>
            </ul> <!-- end of Group Submenu -->
        </li>
        <?php } while ($row_menusubcat = mysql_fetch_assoc($menusubcat)); ?>
    </ul> <!--end of Subcategory Submenu-->


</li> <!--end of Category Submenu-->
<?php } while ($row_menupaging = mysql_fetch_assoc($menupaging)); ?>

 </ul> <!--end of Menu -->

Which basically just stopped working out of nowhere. If I delete this code, require for this file goes through OK so I’m assuming something in here is the problem. I’ve tried reformatting this about 5 times already so I think there must be something my eye is missing.

Any suggestions? Apologies for the state of this code.. trying to fix it up nicer one piece at a time..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:31:07+00:00Added an answer on May 21, 2026 at 6:31 pm

    Not sure if this was a copy/paste error, or the actual issue, but it looks like there’s a PHP open, then a switch to regular HTML without closing the PHP block. (I may not be using the right terms; I’m not a PHP developer – I just stayed at a Holiday Inn Express once :p )

    <!-- Begin the Product Group Submenu -->
                           <ul>
    <?php do  { ?> 
        <li><a href="prodgrouppg.php?groupid=<?php echo $row_menugroup['GroupID']; ?>&amp;groupname=<?php echo $row_menugroup['GroupName']; ?>"><?php echo $row_menugroup['GroupName']; ?></a>
    
    <!-- Retrieve the individual products related to the Group -->                               
    <?php                               
    $groupprod_menuprod = "-1";
    if (isset($row_menugroup['GroupID'])) {
      $groupprod_menuprod = (get_magic_quotes_gpc()) ? $row_menugroup['GroupID'] :     addslashes($row_menugroup['GroupID']);
    }
    mysql_select_db($database_conn_atex, $conn_atex);
    $query_menuprod = sprintf("SELECT products.ProductID, products.ProductName,     products.ProductGroup FROM products WHERE products.ProductGroup=%s ORDER BY products.ProductName", GetSQLValueString($groupprod_menuprod, "int"));
    $menuprod = mysql_query($query_menuprod, $conn_atex) or die(mysql_error());
    $row_menuprod = mysql_fetch_assoc($menuprod);
    $totalRows_menuprod = mysql_num_rows($menuprod);
    ?>
    
    <!-- Begin the product submenu (final menu) -->
    
    <ul>
    <? $row_menuprod = mysql_fetch_assoc($menuprod)) 
    {
        echo ?> <!-- ### close goes here ### -->
        <li>
            <a href="productpg.php?prodid=<?php echo $row_menuprod['ProductID']; ?>">
                <? echo $row_menuprod['ProductName']; ?>
            </a>
        </li>
        </ul> <!-- end of Product Submenu -->
        </li>
             <?php } while ($row_menugroup = mysql_fetch_assoc($menugroup)); ?>
                </ul> <!-- end of Group Submenu -->
            </li>
            <?php } while ($row_menusubcat = mysql_fetch_assoc($menusubcat)); ?>
        </ul> <!--end of Subcategory Submenu-->
    
    
    </li> <!--end of Category Submenu-->
    <?php } while ($row_menupaging = mysql_fetch_assoc($menupaging)); ?>
    
     </ul> <!--end of Menu -->
    

    From working with ASP/VBScript, I’ve found that migrating a page that keeps switching in and out of code/html to straight code can help find the little oddities like forgetting to close out a block or finding a way to tighten up a loop.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.