verifica
This commit is contained in:
parent
2c82d90dd4
commit
5f80048cec
20 changed files with 999 additions and 1 deletions
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
require_once('../../includes/functions.php');
|
||||
checkSession();
|
||||
|
||||
try {
|
||||
$connection = getDbConnection();
|
||||
$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$prepare = $connection->prepare("INSERT INTO `modello` (`codice`, `descrizione`, `quantita`, `tipologia`) VALUES (NULL, ?, ?, ?);");
|
||||
$prepare->bindParam(1, $_POST['descrizione']);
|
||||
$prepare->bindParam(2, $_POST['quantita']);
|
||||
$prepare->bindParam(3, $_POST['tipologia']);
|
||||
|
||||
try {
|
||||
$prepare->execute();
|
||||
} catch (PDOException $e) {
|
||||
echo "Impossibile inserire il modello, controllare i dati";
|
||||
die($e->getMessage());
|
||||
}
|
||||
|
||||
} catch (PDOException $e) {
|
||||
die("Error: " . $e->getMessage());
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="../../includes/css/pico.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
<a href="../dashboard.php" class="button">Torna alla dashboard</a>
|
||||
<h2>Operazione eseguita con successo</h2>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue