Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'database.php';
- $campuses = getCampuses();
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- <script src="functions.js"></script>
- </head>
- <body>
- <header></header>
- <nav></nav>
- <article>
- <h1>Adatbázis kezelés</h1>
- <section>
- <h2>PHP alapokon</h2>
- <form action="" method="POST">
- <label for="campus_id">Telephely:</label>
- <select name="campus_id" onchange="campusChange()">
- <option value="">Válassz!</option>
- <?php foreach ($campuses as $c) : ?>
- <option value="<?=$c['id'] ?>">
- <?=$c['name']?>
- </option>
- <?php endforeach; ?>
- </select>
- <?php if(array_key_exists('campus_id', $_POST)) : ?>
- <label for="building_id">Épület:</label>
- <select name="building_id">
- <option value="">Válassz!</option>
- </select>
- <?php endif; ?>
- <input type="submit" value="Tovább"/>
- </form>
- </section>
- </article>
- <footer></footer>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement