Advertisement
erodemobiles

Guestbook send php

May 1st, 2011
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <?php
  2. include "classes.php";
  3. ob_start();
  4. $mysql = new mysql();
  5. $mysql->connect();
  6. $guestbook = new guestbook();
  7.  
  8. if(isset($_REQUEST["send"])){
  9. $user = $guestbook->secure($_REQUEST["user"]);
  10. $comment = $guestbook->secure($_REQUEST["comment"]);
  11. if(empty($user) or empty($comment)){
  12. echo "Please fill out all fields";
  13. }
  14. else{
  15. $guestbook->newentry($user,$comment);
  16. header('Location: index.php');
  17. }
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement