22.09.2014, 19:10
Humm, but... whats my error?
This is my DB
[IMG]
[/IMG]
Quote:
<?php include("includes/config.php"); if($_POST['login']) { $query = mysql_query("SELECT `ID`, `Password` FROM `users` WHERE `Username` = '" . $_POST['username'] . "'"); if(mysql_num_rows($query)) { $row = mysql_fetch_assoc($query); $password = $row['Contra']; $hashedPassword = $_POST['password']; if(!strcasecmp($hashedPassword, $password)) { $_SESSION['Logueado'] = true; $_SESSION['CuentaID'] = $row['ID']; echo "<center><font class='outline' face='arial' color='#00FF00'><b>Usted, ha logueado correctamente.</b></font></center>"; redirect("index.php"); } else echo "<center><font class='outline' face='arial' color='red'><b>Los datos ingresados son incorrectos.</b></font></center><br>"; } else echo "<center><font class='outline' face='arial' color='red'><b>Los datos ingresados son incorrectos.</b></font></center><br>"; } ?> <html> <br> <br> <br> <div id="ingreso"> <center> <form action='ingreso.php' method='POST'> Bienvenido, por favor ingrese su nombre y contraseсa. <input type='text' name='Username' value='<?php echo $_POST['Username'] ?>' placeholder='Usuario' maxlength='24' size='30' /><br> <input type='password' name='Password' placeholder='Contraseña' maxlength='50' size='30' /><br><br> <input type='hidden' name='login' value='1' /> <input type='submit' value='' class='login' /> </form> </center> </div> </html> |
[IMG]
![](http://i.imgur.com/p4N0zau.png)