validar acceso de usuario
session_start();
require("conexion.php");
$idarea = $_POST['idarea'];
$sql = "select * from area where
idarea='$idarea'";
<!--more-->
$r = mysql_query($sql);
if ($f = mysql_fetch_array($r)) {
$_SESSION['nombre'] = $f['nombre'];
$_SESSION['idarea'] = $f['idarea'];
die("<script>window.location='principal.php';</script>
");
}
?>