Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/09/2012, 04:23
drentero
 
Fecha de Ingreso: febrero-2011
Ubicación: Madrid
Mensajes: 9
Antigüedad: 13 años, 2 meses
Puntos: 0
Consulta Notice: Use of undefined constant operacion

Muy buenas:

No entiendo por qué en este código salen notice's:

Notice: Use of undefined constant operacion - assumed 'operacion' in C:\xampp\htdocs\rentero\Ejercicio\index.php on line 20

Notice: Undefined index: operacion in C:\xampp\htdocs\rentero\Ejercicio\index.php on line 20

Notice: Use of undefined constant nume - assumed 'nume' in C:\xampp\htdocs\rentero\Ejercicio\index.php on line 24

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\index.php on line 30

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\index.php on line 32
Listado de los trabajos

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\listado.php on line 17

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\listado.php on line 19

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\listado.php on line 21

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\listado.php on line 28

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\listado.php on line 28

Notice: Undefined variable: operacion in C:\xampp\htdocs\rentero\Ejercicio\listado.php on line 28

Os paso el código:

Código PHP:
<?php require("datos.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<head>
    <title>Proyectos de empresa</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="css/estilos.css" rel="stylesheet" type="text/css" />
</head>
<body>

<!-- CABECERA -->

<h1> <span id="pz">Empresa</span> <span id="shop" lang="en">Free</span><br/> <span id="lema">Proyectos de empresa</span> </h1>
<h2>Trabajadores</h2>


<?php 


    
if($_GET[operacion])
    
    {
$operacion$_GET[operacion];}
     
     if(!isset(
$_GET[nume])){
         
$nume="";
    }else{ 
        
$nume$_GET[nume];
    }

    if (
$operacion=='informes'){
    include(
'informes.php');
}else if (
$operacion=='informe1'){
    include(
'informe1.php');
}else{
    include(
'listado.php');
}
?>
</body>
</html>