lundi 24 février 2020

Why is this code written with PDO no information stored in the database?

public function insert_data($Data)
{
    $data = "'". implode("','", $Data). "'";
    $sql = $this->pdo->prepare("INSERT INTO user_tbl (name,lastname,password,age,field,comment) values (:data)");
    $sql->bindparam("data",$data);
    $sql->execute();
}



Aucun commentaire:

Enregistrer un commentaire