diff options
-rw-r--r-- | index.php | 6 | ||||
-rw-r--r-- | notes.sql | 25 | ||||
-rw-r--r-- | reservation.php | 13 |
3 files changed, 28 insertions, 16 deletions
@@ -36,11 +36,11 @@ session_start(); echo '<div style="overflow-x:auto;">'; echo "<table>\n"; - echo "<tr>"; + echo "<thead><tr>"; echo "<th>Ime</th>"; echo "<th>Prezime</th>"; echo "<th>Godine</th>"; - echo "</tr>\n"; + echo "</tr></thead><tbody>\n"; foreach($db->query("SELECT * FROM $table where approved=true") as $row) { echo "<tr>"; @@ -50,7 +50,7 @@ session_start(); echo "</tr>\n"; } - echo "</table>\n</div>\n"; + echo "</tbody></table>\n</div>\n"; } catch (PDOException $e) { echo "<p>Error!: " . $e->getMessage() . "</p>"; die(); diff --git a/notes.sql b/notes.sql new file mode 100644 index 0000000..1794c53 --- /dev/null +++ b/notes.sql @@ -0,0 +1,25 @@ +CREATE DATABASE yota_db; +USE yota_db; + +CREATE TABLE activities( + `id` int(11) not null auto_increment primary key, + `fromTime` datetime not null, + `toTime` datetime not null, + `specialCall` varchar(50) not null, + `frequencies` varchar(255) not null, + `modes` varchar(255) not null, + `operatorCall` varchar(50) not null, + `operatorName` varchar(50) not null, + `operatorEmail` varchar(100) not null, + `operatorPhone` varchar(50) not null + ) charset=utf8; + +CREATE TABLE admins( + `id` int(11) not null auto_increment primary key, + `email` varchar(100) not null, + `password` varchar(255) not null + ) charset=utf8; + +GRANT ALL PRIVILEGES ON `yota_db`.* TO `yota_admin`@`localhost` IDENTIFIED BY 'quaequaquagh6ahwoh6Chahx1EiFooGh'; +GRANT SELECT ON `yota_db`.* TO `yota_user`@`localhost` IDENTIFIED BY 'gahdeer6shai9hogai2sai4quuaj1eVu'; +GRANT INSERT ON `yota_db`.`activities` TO `yota_requester`@`localhost` IDENTIFIED BY 'oon5iraeghaidoShi5sheefie2uuz3gu'; diff --git a/reservation.php b/reservation.php index f070d1c..7b34f71 100644 --- a/reservation.php +++ b/reservation.php @@ -44,19 +44,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['fname']) && isset($_PO } } ?> -<form method="post"> -<label for="fname">First name:</label> -<input type="text" id="fname" name="fname"> -<label for="lname">Last name:</label> -<input type="text" id="lname" name="lname"> -<label for="age">Age:</label> -<input type="number" id="age" name="age"> -<input type="submit" value="Submit"> -</form> - -<hr> -<hr> -<hr> <form method="post"> <!-- SPECIAL CALL --> |