Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/11/2018, 17:11
santa2r
 
Fecha de Ingreso: diciembre-2008
Mensajes: 122
Antigüedad: 15 años, 5 meses
Puntos: 1
Pregunta Prblema con imagene como boton de formulario

Hola buenas tengo problemas al querer usar una imagen como boton de formulario nunca pasa por el if isset les pongo todo el codigo para que me digan donde le estoy errando, muchas gracias.

Código PHP:
<?php session_start();
$a = isset($_GET['a']) ? $_GET['a'] : null;
if (isset(
$_POST['entrar'])){
    echo 
"ENTRO AAAaaaaaaa";
    require(
"conectar.php");
    
$sql mysqli_query($conn,"select * from usuario");
    while(
$rs mysqli_fetch_array($sql)){
        if (
$_POST['user']==$rs['name'] and $_POST['pass']==$rs['pass']){
        
$_SESSION["usuario"] = $_POST['user'];
        echo 
"<script> location.href='inicio.php'; </script>";
        }
        else
        { 
         
$a="<font color=\"red\" size=\"2\">Nombre de usuario o contrasena incorrecta.</font>";
         }
    }
}
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administrador</title>
<link rel="stylesheet" href="css/admin.css" type="text/css" media="screen">
</head>

<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="middle">
    <form action="" method="post">
    <table border="0" cellspacing="6" cellpadding="6">
      <tr>
        <td colspan="2" align="center"><img src="image/logo.png" width="102" height="85"></td>
      </tr>
      <tr>
        <td colspan="2" align="center"><?php echo $a?> </td>
        </tr>
      <tr>
        <td><img src="image/usuario.png" width="54" height="54"></td>
        <td><label for="user"></label>
          <input type="text" name="user" id="user" class="campo" tabindex="1"></td>
      </tr>
      <tr>
        <td><img src="image/clave.png" width="54" height="54"></td>
        <td><label for="pass"></label>
          <input type="password" name="pass" id="pass" class="campo" tabindex="2"></td>
      </tr>
      <tr>
        <td colspan="2" align="right"><img src="image/recuperar.png" width="98" height="10"></td>
        </tr>
      <tr>
        <td colspan="2" align="center"><input type="image" value="entrar" name="entrar" src="image/login.png" /></td>
        </tr>
    </table></form></td>
  </tr>
</table>
</body>
</html>