Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
simple php authentication (using include for parameters)
SUBMITTED BY:
Guest
DATE:
June 2, 2013, 4:52 p.m.
FORMAT:
Text only
SIZE:
766 Bytes
Raw
Download
Tweet
HITS:
982778
Go to comments
Report
<?php
session_start();
include('conec.php');
if($_POST['boton']=="Ingresar")
{
$user = $_POST['usuario'];
$pass = $_POST['clave'];
$usuarios = mysql_query("SELECT * FROM Usuario2 WHERE user ='".$_POST['usuario']."'", $link);
while($fila = mysql_fetch_array($usuarios)){
if ($fila['user']=="$user" and $fila['password']=="$pass")
{
$_SESSION['key']=1;
$_SESSION['us']=$_POST['usuario'];
$mensaje = "( ¡Correcto! )";
echo'<meta http-equiv="refresh" content="0;URL=http://www.cmiuchile.cl/news1_c.php">';
}else{
$mensaje = "( ¡Usuario o Contraseña Incorrecto! )";
}
}
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus