$options = [
'admin_name' => FILTER_SANITIZE_FULL_SPECIAL_CHARS | FILTER_VALIDATE_BOOLEAN,
'admin_pass' => FILTER_SANITIZE_STRING
];
$name = filter_input_array(INPUT_POST, $options);
#sb-site, .sb-site-container, .sb-slide, .sb-slidebar {
-webkit-transform: translate(0px);
-moz-transform: translate(0px);
-o-transform: translate(0px);
transform: translate(0px);
}
include_once 'connectDB.php';
if (isset($_POST['entry'])) {
$login = $_POST['login'];
$sql = $pdo->prepare("SELECT login, password FROM dataname WHERE login=?");
$sql->execute([$login]);
$data = $sql->fetch();
if (password_verify($_POST['password'], $data['password'])) {
echo 'YES';
}
else {
echo 'NO';
}
}
$sql = $pdo->prepare('SELECT login FROM users WHERE id=?');
if ( $sql->execute(array($_GET['name'])) )
{
while ($row = $sql->fetchAll())
{
print_r($row);
}
}
$sql = $pdo->prepare('SELECT login FROM users WHERE id=?');
$sql->bindValue(1, $_GET['name']);
$sql->execute();
$data = $sql->fetch();
$sql = $pdo->prepare('SELECT login FROM users WHERE id=:id');
$sql-> execute(array(':id' => (int)$_GET['name']));
$data = $sql->fetchAll();
$host = 'localhost';
$database = 'dbname';
$user = 'user';
$pass = 'root';
$dsn = "mysql:host=$host;dbname=$database;";
$options = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
);
$pdo = new PDO($dsn, $user, $pass, $options);
function user() {
global $pdo;
$stmt = $pdo->query('SELECT * FROM users');
$data = $stmt->fetchAll();
return $data;
}
$datas = user();
var_dump($datas);
$stmt = $pdo->query('SELECT * FROM users');
$data = $stmt->fetchAll();
$name = htmlspecialchars(mysqli_real_escape_string($my,$_POST['name']));
$login = htmlspecialchars(mysqli_real_escape_string($my,$_POST['login']));
$password = htmlspecialchars(mysqli_real_escape_string($my,md5($_POST['password'])));
$captcha = $_POST['captcha'];
$query = mysqli_query($my,("SELECT * FROM `use` WHERE login='$login'")) or die("Ошибка");
$user = mysqli_fetch_assoc($query);