Advertisement
Shad0w

Untitled

Sep 25th, 2011
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <?php include 'core/common.php';
  2. $ime = $_POST['ime'];
  3. $ime1 = htmlspecialchars($ime, ENT_QUOTES);
  4.                     $ime2 = stripslashes($im1);
  5.                     $ime_mod = nl2br($ime2);
  6.                
  7. $ip = $_SERVER['REMOVE_ADDR'];
  8.                     $comment = $_POST['comment'];
  9.                     $com1 = htmlspecialchars($comment, ENT_QUOTES);
  10.                     $com2 = stripslashes($com1);
  11.                     $com_mod = nl2br($com2);
  12.                    
  13. $date = date("Y-m-d H:i:s");
  14. $data = $date;
  15.  
  16. $query = "INSERT INTO comments (data, ip, ime, comment, approve) VALUES ('$data', '$ip', '$ime_mod', '$com_mod', 'da')";
  17.                     $result = mysql_query($query) or die (mysql_error());
  18. if(!result)
  19. {
  20.     echo "DataBase not added, Please check your DataBase!";
  21. }
  22. else
  23. {
  24.     echo "$ime_mod Your Comment has been send to site.";
  25. }
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement