Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include 'core/common.php';
- $ime = $_POST['ime'];
- $ime1 = htmlspecialchars($ime, ENT_QUOTES);
- $ime2 = stripslashes($im1);
- $ime_mod = nl2br($ime2);
- $ip = $_SERVER['REMOVE_ADDR'];
- $comment = $_POST['comment'];
- $com1 = htmlspecialchars($comment, ENT_QUOTES);
- $com2 = stripslashes($com1);
- $com_mod = nl2br($com2);
- $date = date("Y-m-d H:i:s");
- $data = $date;
- $query = "INSERT INTO comments (data, ip, ime, comment, approve) VALUES ('$data', '$ip', '$ime_mod', '$com_mod', 'da')";
- $result = mysql_query($query) or die (mysql_error());
- if(!result)
- {
- echo "DataBase not added, Please check your DataBase!";
- }
- else
- {
- echo "$ime_mod Your Comment has been send to site.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement