$sql = "INSERT INTO users (name, surname, sex) VALUES (?,?,?)";
$stmt= $pdo->prepare($sql);
$stmt->execute([$name, $surname, $sex]);
<a href="deletepost.php?article_id=<?php echo $id; ?>"
class base{
public $conn;
public function __construct(){
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
$this->conn = mysqli_connect('localhost', 'drops', '', 'teach');
mysqli_set_charset($mysqli, $charset);
}
public function query($query, $params = []) {
if (!$params) {
return $this->conn->query($query);
}
$types = $types ?: str_repeat("s", count($params));
$stmt = $this->conn->prepare($sql);
$stmt->bind_param($types, ...$params);
$stmt->execute();
return $stmt;
}
public function get_row($query, $params = []) {
$stmt = $this->query($query, $params);
return $stmt->get_result()->fetch_assoc(MYSQLI_ASSOC);
}
public function get_all($query, $params = []) {
$stmt = $this->query($query, $params);
return $stmt->get_result()->fetch_all(MYSQLI_ASSOC);
}
}
position: absolute;
.imeg {
position: relative;
width: 100%;
min-height: 100vh;
background: url(https://ai-development.ru/wp-content/uploads/2019/04/cover.jpg) fixed no-repeat;
background-size: cover;
color: #fff;
}