Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?php
  2. require_once 'database.php';
  3. $campuses = getCampuses();
  4. ?>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta charset="UTF-8">
  9. <title></title>
  10. <script src="functions.js"></script>
  11. </head>
  12. <body>
  13. <header></header>
  14. <nav></nav>
  15. <article>
  16. <h1>Adatbázis kezelés</h1>
  17. <section>
  18. <h2>PHP alapokon</h2>
  19. <form action="" method="POST">
  20. <label for="campus_id">Telephely:</label>
  21. <select name="campus_id" onchange="campusChange()">
  22. <option value="">Válassz!</option>
  23. <?php foreach ($campuses as $c) : ?>
  24. <option value="<?=$c['id'] ?>">
  25. <?=$c['name']?>
  26. </option>
  27. <?php endforeach; ?>
  28. </select>
  29.  
  30. <?php if(array_key_exists('campus_id', $_POST)) : ?>
  31. <label for="building_id">Épület:</label>
  32. <select name="building_id">
  33. <option value="">Válassz!</option>
  34. </select>
  35. <?php endif; ?>
  36. <input type="submit" value="Tovább"/>
  37. </form>
  38. </section>
  39. </article>
  40. <footer></footer>
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement