Login #1

Merged
PBS2H21ASH merged 15 commits from feat/login into don 2023-01-18 08:40:26 +01:00
Showing only changes of commit 23cf1b54e4 - Show all commits

View File

@ -44,17 +44,19 @@ class BancaDati {
$value = "";
$column = "";
foreach ($values as $col => $v){
$value .= $v . ",";
$value .= "'" . $v . "'" . ",";
$column .= $col . ",";
}
$value = trim($value, ",");
$column = trim($column, ",");
$sql = "INSERT INTO $table($column) VALUES ($value);";
$sql = "INSERT INTO $table ($column) VALUES ($value);";
var_dump($sql);
try {
$sth = $this->pdo->prepare($sql);
$sth->execute();
}catch (PDOException $e){
var_dump($e);
die;
}
}