From 559703caa249cae632cfd8a1707b6ec38d3e0e9d Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 20 Jan 2025 08:57:42 +0100 Subject: [PATCH] Form query --- pdo/classifica_pazienti/index.php | 57 ++++++++++++++++++++++++ pdo/classifica_pazienti/result.php | 70 ++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 pdo/classifica_pazienti/index.php create mode 100644 pdo/classifica_pazienti/result.php diff --git a/pdo/classifica_pazienti/index.php b/pdo/classifica_pazienti/index.php new file mode 100644 index 0000000..a7c8338 --- /dev/null +++ b/pdo/classifica_pazienti/index.php @@ -0,0 +1,57 @@ +"; + + $prepare = $connection->prepare("SELECT id, cognome, nome FROM medici"); + $prepare->execute(); + if ($prepare->rowCount() > 0) { + $datiMedici = $prepare->fetchAll(); + } + $connection = null; + +} catch (PDOException $e) { + die ("Error!: " . $e->getMessage() . "
"); +} + +?> + + + + HTML + + + + +
+

Ricerca Pazienti per Medico

+
+ + + +
+
+ + + diff --git a/pdo/classifica_pazienti/result.php b/pdo/classifica_pazienti/result.php new file mode 100644 index 0000000..863be9e --- /dev/null +++ b/pdo/classifica_pazienti/result.php @@ -0,0 +1,70 @@ +"; + + $prepare = $connection->prepare("SELECT cognome, nome, note FROM pazienti"); + $prepare->execute(); + if ($prepare->rowCount() > 0) { + $datiPazienti = $prepare->fetchAll(); + } + $connection = null; + +} catch (PDOException $e) { + die ("Error!: " . $e->getMessage() . "
"); +} +?> + + + + + HTML + + + + +
+
+
+ + +
+ + +
+
+ + + +