Ok, I have little to zero knowledge of php. The person that created our website is now working for a design firm and is not allowed to do freelance work so I am S.O.L. at this point and any coding help is appreciated.
2 days ago our website all of the sudden become non-functional. Nothing was done (to my knowledge) to the coding. Supposedly our web host changed some permissions to some files and/or directories on our FTP and since then our site has not worked.
This is where it's telling me that there is an error on line 37. Do any of you see anything wrong with the code? Thanks in advance.
<?php
//db connection here
$topquery=mysql_query("SELECT sectionID,sectionName,sectionDescription,topSection,rootSection FROM sections WHERE topSection = 0 ORDER BY sectionOrder") or print(mysql_error());
while ($top = mysql_fetch_array($topquery)) {
$topname = $top['sectionName'];
$topid = $top['sectionID'];
$rootSection=$top['rootSection'];
//show category info
if($rootSection==0) {
/* -------------- This is for the categories with Sub Categories ------------------------------------------------- */
echo "<h3 id=\"c$topid\"><a href=\"/categories.php?cat=$topid\">$topname</a></h3>";
{echo "<ul class=\"nav\">";
}
}else{
echo "<h3 class=\"sale\" id=\"c$topid\"/><a href=\"/products.php?cat=$topid\">$topname</a></h3>";}
//db connection2 here
if($rootSection<>0) {
$sectionid=$topid;
//now show products SELECT pID, pName, FROM products
$product = mysql_query("SELECT DISTINCT products.pId,products.pName FROM products LEFT JOIN multisections ON products.pId=multisections.pId WHERE pDisplay<>0 AND (products.pSection IN (" . $sectionid . ") OR multisections.pSection IN (" . $sectionid . "))");
while ($prod = mysql_fetch_array($product)) {
$productName = $prod['pName'];
$productid = $prod['pId'];
//show the links
echo /*"<li><a href=\"./proddetail.php?prod=$productid\">$productName</a></li>"*/;}
}else{
$sec=mysql_query("SELECT sectionID,sectionName,sectionDescription,topSection,rootSection FROM sections WHERE topSection = '$topid' ORDER BY sectionOrder");
while ($sub = mysql_fetch_array($sec)) {
$sectionName = $sub['sectionName'];
$sectionid = $sub['sectionID'];
//show sub-category info
echo "<li id=\"c$sectionid\"><a href=\"/products.php?cat=$sectionid\">$sectionName</a></li>";
}
{echo "</ul>";}
}
}
?>