This is the code placed in unlock.php:
> <?php require_once("../../db-config.php");
>
> $Result = "ERROR, still locked..."; if (isset($_POST['User'])) {
> if (mysql_query("DELETE FROM LoginAttempts WHERE User='".$_POST['User']."'", $conn))
> $Result = "User Unlocked"; } if ($conn)
> mysql_close($conn); echo $Result; ?>
I want to unlock a user, I'm trying like this but getting the error "Error still locked..." instead of "User unlocked":
http://example.com/unlock.php?User=Administrador
How should I pass the variable User=name in the URL?
$_GETinstead of Post. GET if for getting parameters from URL, POST is for data submitted by a HTML form. And yes, you're not save for SQL injections at all.$_POSTto$_GET