más eficaz posible?.
parte de código:
1.php
<?php
$usuario=$HTTP_POST_VARS['usuario'];
$password=$HTTP_POST_VARS['password'];
$rs_1=mysql_query("select * usuarios where usuario='$usuario' and password='$password')", $conn);
$res=mysql_fetch_assoc($rs_1);
//inicio la session
session_start();
if($usuario==true){
$_SESSION['nombreusuario']=$usuario;
}
?>
2.php
<?php
session_start();
if (isset($_SESSION['nombreusuario'])){
include_once("control.php");//este archivo verifica el tiempo inactivo en seg. del us
//si se supera el limite el else es true
}
else{
header("Location:index.php");
die();
}
?>
Gracias y saludos!!!
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)