All pastes #146713 Raw Edit

Stuff

public php v1 · immutable
#146713 ·published 2006-08-23 20:29 UTC
rendered paste body
			if(strip_tags($HTTP_POST_VARS['terms']) !== 'agree') {				box('Error!', 'You have to agree to the terms to post an comment.', '100');			} else {				$username	= htmlspecialchars(strip_tags($HTTP_POST_VARS['username']));				$comment		= htmlspecialchars(strip_tags($HTTP_POST_VARS['comment']));					if(!empty($username) && !empty($comment)) {						$time = time();						mysql_query("INSERT INTO `glest_posts` (`post_nid`, `post_message`, `post_author`, `post_date`) VALUES ('{$row['news_id']}', '$comment', '$username', '$time')") || box('Error!', 'There was an error saving the comment.<br /><br />'.mysql_error(), '100');										}			}