Ver Mensaje Individual
  #9 (permalink)  
Antiguo 29/08/2012, 19:28
xoceunder
 
Fecha de Ingreso: junio-2012
Ubicación: En el Mundo
Mensajes: 759
Antigüedad: 11 años, 10 meses
Puntos: 10
Respuesta: duda de como hacer un loading al login

ok mira es que tengo esto

Código PHP:
Ver original
  1. <?php
  2.    
  3.     // -- check for login parameters
  4.     if( isset($_REQUEST["username"]) and isset($_REQUEST["password"]) )
  5.     {
  6.         $_REQUEST["username"] = entry_filter($_REQUEST["username"]);
  7.         $_REQUEST["password"] = entry_filter($_REQUEST["password"]);
  8.  
  9.         if( $_REQUEST["username"] == "" or $_REQUEST["password"] == "" )
  10.         {
  11.             $status_message = "LOGIN_NO_INFO";
  12.         }
  13.         else
  14.         {
  15.             if( query_scalar("select count(*) from users where username = '".
  16.                     $_REQUEST["username"]."' and password = '".
  17.                     $_REQUEST["password"]."' and status = 'A'") > 0 )
  18.             {
  19.                 $status_message = "";
  20.  
  21.                 $_SESSION["username"] = $_REQUEST["username"];
  22.                
  23.                 $G_username = $_SESSION["username"];
  24.                 $G_username_name = $_SESSION["username_name"];
  25.                 update_login_info();
  26.                 send_date();
  27.  
  28.                 if( $_SESSION["type"] == "admin" )
  29.                     header("Location: admin.php");
  30.                 else if( $_SESSION["type"] == "manager" )
  31.                     header("Location: manager.php");
  32.                 else
  33.                     header("Location: user.php");
  34.                
  35.                 die;
  36.             }
  37.             else $status_message = "LOGIN_INVALID";
  38.         }
  39.     }
  40.     else $status_message = "";
  41.    
  42. ?>
  43.  
  44.                 <table style="margin-left: 20px; margin-top: 10px;" border="0">
  45.                     <tr>
  46.                         <td></td>
  47.                         <td height="15">Login Area.</td>
  48.                     </tr>
  49.                     <tr>
  50.                         <td colspan="2" height="5"></td>
  51.                     </tr>
  52.                     <tr>
  53.                         <td class="fieldTitle">Username:</td>
  54.                         <td><input type="text" name="username" size="25"></td>
  55.                     </tr>
  56.                     <tr>
  57.                         <td class="fieldTitle">Password:</td>
  58.                         <td><input type="password" name="password" size="25"></td>
  59.                     </tr>
  60.                     <tr>
  61.                         <td></td>
  62.                         <td><input type="submit" name="login" value="Login"></td>
  63.                     </tr>
  64.                     <tr>
  65.                         <td colspan="2" height="10"></td>
  66.                     </tr>
  67.                     <tr>
  68.                         <td colspan="2" class="errorMessage"><?php if( $status_message <> "" ) echo($status_message."."); ?></td>
  69.                     </tr>
  70.                     <?php if( $status_message <> "" ) { ?>
  71.                     <tr>
  72.                         <td colspan="2" height="15"></td>
  73.                     </tr>
  74.                     <?php } ?>
  75.                 </table>

y quiero hacer que ante de ejecutar para entrar genere un loading o algo que indique estamos redirigindo espero un momento