Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <?php
  2. if(isset($_SESSION['zalogowany'])){
  3. if(isset($_POST['usermsg']) && isset($_POST['submitmsg']))
  4. {
  5. $tekst = $_POST['usermsg'];
  6. $user = $_SESSION['username'];
  7. $wiadomosc = 'Wiadomość od ' . $user . ' - treść:
  8. '.$tekst;
  9. mail('gstraczek13@gmail.com', 'Mail Grzegorza', $wiadomosc);
  10. }
  11. ?>
  12.  
  13. <div id="wrapper">
  14. <div id="menu">
  15. <div class="welcome">Witaj, <b><?php echo $_SESSION['username']; ?></b></div>
  16.  
  17. <div style="clear:both"></div>
  18. </div>
  19.  
  20. <div id="chatbox"></div>
  21.  
  22. <form name="message" action="">
  23. <input name="usermsg" type="text" id="usermsg" size="63" />
  24. <input name="submitmsg" type="submit" id="submitmsg" value="wyślij" />
  25. </form>
  26. </div>
  27.  
  28. <?php
  29. } else {
  30. echo "<div class=\"box\" style='text-align: center;'>Tylko dla zalogowanych!</div>";
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement