-1
I have the tables in the database well done, but then when I do the code, the content doesn’t even appear, I wish I had help sff
the code I have is this:
$resultado = mysql_query("SELECT titulo FROM menu WHERE id_menu = 1 ORDER BY id_menu ") or die(mysql_error());
while($linha = mysql_fetch_array($resultado)) {
echo "<li> ".$linha[''] . " " . $home ." </li>";
}
$resultado = mysql_query("SELECT titulo FROM menu WHERE id_menu = 2 ORDER BY id_menu ") or die(mysql_error());
$result = mysql_query("SELECT titulo FROM submenu WHERE id_submenu = 2 ORDER BY id_submenu ") or die(mysql_error());
while($linha = mysql_fetch_array($resultado)) {
echo " <li class= 'dropdown ' >
<a echo $orgaosMenu; href='#' class='dropdown-toggle' data-toggle='dropdown' style='padding-top: 15px;border-top: 0px solid #3B7D26;'>" . $linha['titulo'] . "<b class='caret'></b></a>
" . $orgaosMenu . "</li>";
while($line = mysql_fetch_array($result)){
echo "<ul class='dropdown-menu'>
<li> " .$line['titulo'] . " </li>";
}
}
$resultado = mysql_query("SELECT titulo FROM menu WHERE id_menu = 3 ORDER BY id_menu ") or die(mysql_error());
while($linha = mysql_fetch_array($resultado)) {
echo " <li class= 'dropdown ' >
<a echo $autarcasMenu; href='#' class='dropdown-toggle' data-toggle='dropdown' style='padding-top: 15px;border-top: 0px solid #3B7D26;'>" . $linha['titulo'] . "<b class='caret'></b></a>
" . $autarcasMenu . "</li>";
}
$resultado = mysql_query("SELECT titulo FROM menu WHERE id_menu = 4 ORDER BY id_menu ") or die(mysql_error());
while($linha = mysql_fetch_array($resultado)) {
echo " <li class= 'dropdown ' >
<a echo $militanciaMenu; href='#' class='dropdown-toggle' data-toggle='dropdown' style='padding-top: 15px;border-top: 0px solid #3B7D26;'>" . $linha['titulo'] . "<b class='caret'></b></a>
" . $militanciaMenu . "</li>";
}
$resultado = mysql_query("SELECT titulo FROM menu WHERE id_menu = 5 ORDER BY id_menu ") or die(mysql_error());
while($linha = mysql_fetch_array($resultado)) {
echo " <li >
<a echo $multimediaMenu; href='#' class='dropdown-toggle' data-toggle='dropdown' style='padding-top: 15px;border-top: 0px solid #3B7D26;'>" . $linha['titulo'] . "<b ></b></a>
" . $multimediaMenu . "</li>";
}
$resultado = mysql_query("SELECT titulo FROM menu WHERE id_menu = 6 ORDER BY id_menu ") or die(mysql_error());
while($linha = mysql_fetch_array($resultado)) {
echo " <li >
<a echo $contactosMenu; href='http://www.w3schools.com/php/php_mysql_where.asp' class='dropdown-toggle' data-toggle='dropdown' style='padding-top: 15px;border-top: 0px solid #3B7D26;'>" . $linha['titulo'] . "<b ></b></a>
" . $contactosMenu . "</li>";
}
?>
I really need help, please....
– Barofscas
add these two lines at the beginning of the file:
ini_set('display_errors', true);
 error_reporting(E_ALL);
and place error messages.– rray
this line here already issues a notice:
echo "<li> ".$linha[''] . " " . $home ." </li>";
an information should be accessed, I believe it would be$linha['titulo']
.– rray
it would be nice to pass the design of the database..
– Charles S. Ferreira