Por favor ......... AYUDA
Espero que alguien pueda ayudarme a arreglar esta función......... Desde ya muchas gracias.....
<?php session_start(); if($_SESSION[\'autentificado\']!="n1"){header("Location:error.php?".SID);exit();
if($_SESSION[\'autentificado\']!="n2"){header("Location:registro.php?".SID);exit();
}}
<?php session_start(); if($_SESSION[\'autentificado\']!="n1"){header("Location:error.php?".SID);exit();
if($_SESSION[\'autentificado\']!="n2"){header("Location:registro.php?".SID);exit();
}}
Bueno en principio decirte que estas 3 líneas que mandas no es ninguna función. El error lo tienes en las llaves, las tienes mal colocadas debes quitar una de las llaves que tienes al final del código y ponerla depués del punto y coma del primer exit tal que así:
<?php
session_start();
if($_SESSION['autentificado']!="n1"){header("Location:error.php?".SID);exit();}
if($_SESSION['autentificado']!="n2"){header("Location:registro.php?".SID);exit();}
?>
Un saludo
<a href="http://www.novanebula.net/blog/">Novanebula blog</a>
<?php
session_start();
if($_SESSION['autentificado']!="n1"){header("Location:error.php?".SID);exit();}
if($_SESSION['autentificado']!="n2"){header("Location:registro.php?".SID);exit();}
?>
Un saludo
<a href="http://www.novanebula.net/blog/">Novanebula blog</a>
Ese SID que tienes también es un poco sospechoso no se que quieres hacer con el pero creo que lo que intentas es hacer algo estilo
session_name().'='.session_id()
Si no te va con tu SID sustityelo exactamente por la línea de arriba. Así te debería quedar:
<?php
session_start();
if($_SESSION['autentificado']!="n1"){header("Location:error.php?".session_name().'='.session_id());exit();}
if($_SESSION['autentificado']!="n2"){header("Location:registro.php?".session_name().'='.session_id());exit();}
?>
http://www.novanebula.net/blog/
session_name().'='.session_id()
Si no te va con tu SID sustityelo exactamente por la línea de arriba. Así te debería quedar:
<?php
session_start();
if($_SESSION['autentificado']!="n1"){header("Location:error.php?".session_name().'='.session_id());exit();}
if($_SESSION['autentificado']!="n2"){header("Location:registro.php?".session_name().'='.session_id());exit();}
?>
http://www.novanebula.net/blog/