Ver Mensaje Individual
  #17 (permalink)  
Antiguo 09/09/2009, 12:35
Avatar de hoberwilly
hoberwilly
 
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 15 años, 11 meses
Puntos: 2
Respuesta: Llenar un formulario para que pagina.php sea habilitada

Favor si algun javasero pueda ayudar con este tema:

Mi formulario de logeo es simple:
form_logeo.php
--------------------
<form name="" method="post" action="validar.php">
<table>
<tr><td>User:<input type="text" name="user"></td></tr>
<tr><td>Pass:<input type="text" name="pass"></td></tr>
</table>
</form>

Validacion.php
-----------------
<?php
include(conexion.php);
$user=$_POST['user'];
$pass=$_POST['pass'];
$qry=mysql_query("select cod,privilegio from usuarios");
while($row=mysql_assoc($qry)){
if($row['privilegio']==1{ ///////con esta clave el usuario puede acceder a caja
header(Location: caja.php);
}else
{
header(Location: otrapagina.php); ////OJO, que tambien existe otros usuarios como admin,vendedor,etc
}
}
?>

Aqui en esta pagina esta la implementacion:
caja.php
----------
<html>
<head>
</head>
<body>
<table>
<tr><td>Ingresaste pero estare deshabilitado hasta que llenes el TIPO DE CAMBIO</td></tr>
</table>
</body>
</html>

esta formulario simple quiero que emerja para ser llenado (SOLO PARA USUARIO CAJERO):
<table>
<tr><td>Tipo de Cambio del Día: <input type="text" name="tipcambio" ></td></tr>
</table>

para que la pagina caja.php ESTE HABILITADA para trabajar en ella



Gracias de antemano por sus sugerencias,
Willy S.