Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $login = $_POST['login'];
- $password = $_POST['password'];
- $db_hostname = 'localhost';
- $db_database = 'credito_seguro';
- $db_username = 'root';
- $db_password = '';
- $db_server = mysql_connect($db_hostname, $db_username, $db_password);
- if(!$db_server) die("No se ha podido establecer conexión con el servidor: " . mysql_error());
- mysql_select_db($db_database) or die("No se ha podido establecer conexión con la base de datos: " . mysql_error());
- $query = "SELECT * FROM usuarios WHERE usu_codigo=$login limit 1";
- $result = mysql_query($query);
- if(!$result) die("Acceso a la base de datos fallido: " . mysql_error());
- while($row = mysql_fetch_object($result)) {
- if(($row->usu_codigo != $login) || ($row->usu_clave != $password)) {
- print "Usuario o contraseña inválida";
- print '<a href="index.php">Regresar al inicio</a>';
- } else {
- print "Bienvenido al sistema";
- }
- }
- mysql_free_result($result);
- mysql_close($db_server);
- ?>
- <html>
- <head>
- <title>MENU DEL SISTEMA</title>
- </head>
- <body>
- <body bgcolor="#CCCCCC">
- <br>
- <h1><p align="center"><font face="Arial, Helvetica, sans-serif" color="#0033FF" size="+5"> MENU DEL SISTEMA </font></h1>
- <p align="center"><input type=IMAGE SRC="menu.gif" name="menu1" width="150" height="50">
- <input type=IMAGE SRC="actualizar_clientes.gif" name="actualizar_clientes" width="150" height="50"> <br>
- <p align="center"><input type=IMAGE SRC="registrar_transacciones.gif" name="Registro de Transacciones" width="150" height="50">
- <input type=IMAGE SRC="cuentas_cobrar.gif" name="Cuentas por cobrar" width="150" height="50"> <br>
- <p align="center"><input type=IMAGE SRC="estado_cuenta.gif" name="Estado de Cuenta" width="150" height="50">
- <input type=IMAGE SRC="resumen_anual.gif" name="Resumen anual" width="150" height="50"> <br>
- <p align="center"><input type=IMAGE SRC="cierre.gif" name="Cierre de Sesion" width="150" height="50">
- <input type=IMAGE SRC="boton_blanco.gif" name="Opcional" width="150" height="50">
- <p align="center"><img src="cre_seguro.jpg" alt="cre_seguro" width="400" height="150">
- </body>
- </html>
Add Comment
Please, Sign In to add comment