Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/02/2011, 13:35
maldini3783
 
Fecha de Ingreso: febrero-2011
Mensajes: 89
Antigüedad: 13 años, 2 meses
Puntos: 1
Problema con header

He perdido ya bastante tiempo con la m***** esta y lo gracioso es que antes rulaba...pero he estado haciendo unas modificaciones y adios.Lo he estado intentando ahora utilizando una funcion pero nada.Aver si alguien me abre los ojos.Codigo:

<?php
session_start();
function Cabecera(){
header('Location: seccionEmpleado.php');
}
if(isset($_POST['IdEmple'])){
if($c=mysql_connect("localhost","root",""))
$base="gestionbolera";
$tabla="empleados";
# establecemos la conexión con el servidor
$c=mysql_connect ("localhost","root","");
# seleccionamos la base de datos
mysql_select_db ($base, $c);
$myusername=$_POST['IdEmple'];
$mypassword=$_POST['Nif'];
//Limpias Cmapos...
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM empleados WHERE idEMPLEADO='".$myusername."' and Nif='".$mypassword."'";
$result=mysql_query($sql);
$rows = mysql_fetch_array($result,MYSQL_ASSOC);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
if($count==1){
echo "entra";
$_SESSION["Nombre"]=$rows["Nombre_Empleado"];
$_SESSION["TipoEmpleado"]=$rows["TipoEmpleado"];
$_SESSION["Id"]=$rows["idEMPLEADO"];
Cabecera();//Aqui antes tenia el header
}
else {
$errorUsu=1;
mensageLog($errorUsu);
}
}
?>
<form method=post >
<h1>BOWLING</h1>
<table width=1331 height=485 bordercolor=#000000 border=2>
<tr>
<td width=788 height=477>BIENVENIDO </td>
<td width=525>
<h2>Zona Empleados</h2>
<label>IdEmpleado</label>
<input type=text name=IdEmple>
<label> NIF</label>
<input type=text name=Nif>
<input type=submit value=Enviar datos>
</td>
</tr>
</table>
</form>

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="Proyecto.css">
<title>Aplicacion</title>
</head>
<body>


</body>
</html>

GRACIAS