Ania2019

index.php

May 11th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <form method="post" action="save.php">
  2. <label>Podaj adres e-mail
  3. <input type="email" name="email"
  4. <?=
  5. isset($_SESSION['given_email']) ?
  6. 'value="'.$_SESSION['given_email']. '"' : ''
  7.  
  8. ?>
  9. <?=
  10. isset($_SESSION['new_email']) ?
  11. 'value="'.$_SESSION['new_email']. '"' : ''
  12.  
  13. ?>>
  14. </label>
  15.  
  16. <input type="submit" value="Zapisz się!">
  17. <?php
  18. if (isset($_SESSION['given_email'])) {
  19. echo '<p> To nie jest poprawny adres!</p>';
  20. unset($_SESSION['given_email']);}
  21. if (isset($_SESSION['new_email'])) {
  22. echo '<p> Ten adres istnieje juz w BD!</p>';
  23. unset($_SESSION['new_email']);
  24.  
  25. }
  26. ?>
  27.  
  28.  
  29. </form>
Advertisement
Add Comment
Please, Sign In to add comment