En el index.php mesalta esos dos errores
Notice: Undefined index: id_menu in C:\wamp\www\BLOG\index.php on line 25
Notice: Undefined index: id_menu in C:\wamp\www\BLOG\index.php on line 62
En las demas secciones,por ejemlo en: index.php?id_menu=5, todo va bien, solo es en index.php que me tira ese error, gracias por su ayuda
Mi script es este:
<?php
require_once("conexion.php");
?>
<html>
<head>
<title>Sitio Din?co</title>
<style type="text/css">
body{ margin-top:0px; top:0px;}
#principal{ width:800px; height:600; border:solid}
#header{ width:800px; height:100px; float:left}
#menu{ width:800px; height:40px; float:left}
#main{ width:800px; height:500px; float:left}
#contenido{ width:700px; height:500px; float:left}
.boton{ width:100px; height:25px; float:left; background-color:#666666; color:#FFFFFF}
.url{ color:#FFFFFF; text-decoration:none}
</style>
</head>
<body>
<div id="principal">
<div id="header">
<?php
$sql="select * from header where id_menu=".$_GET["id_menu"]." ";
$res=mysql_query($sql) or die (mysql_error());
while ($reg=mysql_fetch_array($res))
{
?>
<img src="ima/<?php echo $reg["imagen"];?>" width="800" height="100" align="100">
<?php
}
?>
</div>
<div id="menu">
<?php
$sql="select * from menu";
$res=mysql_query($sql,$con);
while ($reg=mysql_fetch_array($res))
{
?>
<div align="center" class="boton">
<a href="index.php?id_menu=<?php echo $reg["id_menu"];?>" class="url">
<?php echo $reg["texto"];?>
</a>
</div>
<?php
}
?>
</div>
<div id="main">
<!--********************************************-->
<!--********************************************-->
<div align="center" id="contenido">
<?php
$sql2="select * from contenido where id_menu=".$_GET["id_menu"]." ";
$res2=mysql_query($sql2) or die (mysql_error());
while ($reg2=mysql_fetch_array($res2))
{
?>
Contenido: <?php echo $reg2["texto"];?>
<?php
}
?>
</div>
</div>
</div>
</body>
</html> Pertenece a la categoría:
| |