Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_SESSION['zalogowany'])){
- if(isset($_POST['usermsg']) && isset($_POST['submitmsg']))
- {
- $tekst = $_POST['usermsg'];
- $user = $_SESSION['username'];
- $wiadomosc = 'Wiadomość od ' . $user . ' - treść:
- '.$tekst;
- mail('gstraczek13@gmail.com', 'Mail Grzegorza', $wiadomosc);
- }
- ?>
- <div id="wrapper">
- <div id="menu">
- <div class="welcome">Witaj, <b><?php echo $_SESSION['username']; ?></b></div>
- <div style="clear:both"></div>
- </div>
- <div id="chatbox"></div>
- <form name="message" action="">
- <input name="usermsg" type="text" id="usermsg" size="63" />
- <input name="submitmsg" type="submit" id="submitmsg" value="wyślij" />
- </form>
- </div>
- <?php
- } else {
- echo "<div class=\"box\" style='text-align: center;'>Tylko dla zalogowanych!</div>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement