From 495b474c43bac4ec9b83d9e24b3c28db6918ad0d Mon Sep 17 00:00:00 2001 From: Wisdurm Date: Mon, 3 Nov 2025 13:55:02 +0200 Subject: [PATCH] =?UTF-8?q?Ty=C3=B6paikka=20info=20autofill?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/uusopiskelija.php | 71 +++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/public/uusopiskelija.php b/public/uusopiskelija.php index 031e552..3a79738 100644 --- a/public/uusopiskelija.php +++ b/public/uusopiskelija.php @@ -7,6 +7,19 @@ header('Location: '.$newURL); die(); } + // Otetaan tietokannasta harjoittelupaikkojen tiedot jotta voi autofill tiedot sieltä + // Annetaan tiedot javascriptille :fear: + + // SQL komento: saadaan oppilaat + $sql = "SELECT * FROM harjoittelupaikat"; + $result = $conn->query($sql); // Aja komento + // Jos tuloksia + $paikat = []; + if ($result->num_rows>0){ + while($row = $result->fetch_assoc()){ + $paikat[] = $row; + } + } ?> @@ -15,7 +28,37 @@ Lisää opiskelija - + + @@ -37,7 +80,14 @@
Yrityksen tiedot - + + + "; + } + ?> +
@@ -50,23 +100,6 @@
-
- - - - - - - - - - - - - - - -
-- 2.47.3