Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

drop down menu

Avatar of saul_roldan
saul_roldan asked on
Adobe Dreamweaver
20 Comments1 Solution177 ViewsLast Modified:
Im making a navigation menu using dreamweaver spry widget.

Im using a tree menu that works and adapting it to this widget, but is not working can anyone guide me?
<?php require_once('Connections/newWeb.php'); ?>
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
  return $theValue;
$colname_content = "-1";
if (isset($_GET['id'])) {
  $colname_content = $_GET['id'];
mysql_select_db($database_newWeb, $newWeb);
$query_content = sprintf("SELECT contenido FROM arti_submenu WHERE articulo_id = %s ORDER BY articulo_id ASC", GetSQLValueString($colname_content, "int"));
$content = mysql_query($query_content);
$row_content = mysql_fetch_assoc($content);
//$totalRows_content = mysql_num_rows($content);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
echo '<ul id="MenuBar1" class="MenuBarHorizontal">';
  echo '<li><a class="MenuBarItemSubmenu" href="#">'; 
mysql_select_db($database_newWeb, $newWeb);
$query_menu = "SELECT * FROM arti_menu WHERE seccion_id = seccion_id ORDER BY seccion_id ASC";
$menu = mysql_query($query_menu, $newWeb) or die(mysql_error());
	while ($row_menu = mysql_fetch_assoc($menu)){ 
	   echo $row_menu['menu'] . '<br></a>';
	  echo '<ul>';
        echo '<li>';
	  		$query_submenu = "SELECT * FROM arti_submenu WHERE seccion_id =" .$row_menu['seccion_id']."";
			$submenu = mysql_query($query_submenu, $newWeb) or die(mysql_error());
	 		while ($row_submenu = mysql_fetch_assoc($submenu)){ 
            echo '<a href="tst.php?id=' .$row_submenu['articulo_id'] . '">'. $row_submenu['titulo'] . '<br></a>';
		echo '</li>';
		echo '</ul>';
		echo '</li>';
		echo '</ul>';
<p><?php echo $row_content['contenido']; ?></p>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
Avatar of Jason C. Levine
Jason C. LevineFlag of United States of America imageDon't talk to me.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers