Ver Mensaje Individual
  #19 (permalink)  
Antiguo 08/08/2010, 18:29
johhan16
 
Fecha de Ingreso: junio-2010
Ubicación: Venezuela, Zulia
Mensajes: 686
Antigüedad: 13 años, 10 meses
Puntos: 55
Respuesta: Problemas con formulario en localhost, en zobyhost.com funciona bien

bueno estoy adaptando el codigo como me han recomendado aqui, ahora bien el codigo quedo asi
Código PHP:
<?
session_start
();
include(
"seguridad.php");
    
/* Iniciamos sesión dentro de esta página también mediante la función session_start(); */
    
if($_SESSION["falla"]==0)
    {
    
$_SESSION["autorizacion"]="si";
    
header("Location: alumnos/infoalum.php");
    }
    elseif(
$_SESSION["falla"]==2)
    {
    
$_SESSION["autorizacion"]="positivo";
    
header("Location: profesor/infoprofe.php");
    }
    elseif(
$_SESSION["falla"]==3)
    {
    
$_SESSION["autorizacion"]="correcto";
    
header("Location: supervisor/infosuper.php");
    }

    
/* Lo primero ... */
    
else
    {
    unset(
$_SESSION["falla"]);
    
session_destroy();
    
header("Location: index.php");
    }
    
/* En caso .... */
  
?>
entonces me muestra este error

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\iutc\seguridad.php:35) in C:\xampp\htdocs\iutc\acceso3.php on line 13

este es el codigo de seguridad.php

Código PHP:
<?php
function getClearString($var){
    if(!
is_array($var)){
        return 
addslashes(stripslashes(htmlentities($var)));
    } else {
        return 
$var;
    }
}
if(
is_array($_GET))
$_GET array_map("getClearString"$_GET);
if(
is_array($_POST))
$_POST array_map("getClearString"$_POST);
if(
is_array($_COOKIE))
$_COOKIE array_map("getClearString"$_COOKIE);
if(
is_array($_SESSION))
$_SESSION array_map("getClearString"$_SESSION);
?>