All pastes #296786 Raw Edit

spear_

public php v1 · immutable
#296786 ·published 2006-12-30 15:40 UTC
rendered paste body
<?phpinclude('/home/rmdote7/newsdb.php');/*This starts the session that we created on the news.php page so we can read the image verification*/session_start(); /*This trims the random variable of any white space that the user may have unknowingly put in.*/$_POST['verify'] = trim($_POST['verify']);//this redfined the post variable for easier reference$postid = (int)$_POST['id'];//strips the inputted fields of dangerous injections$name = mysql_real_escape_string(stripslashes($_POST['name']));$comment = mysql_real_escape_string(stripslashes($_POST['comment']));//checks that the image verify entered on the form matches the image session variableif ($_SESSION['new_string'] == $_POST['verify']){echo $_SESSION['new_string'];echo $_POST['verify'];echo 'This if block was Equal and True';}else{echo $_SESSION['new_string'];echo $_POST['verify'];echo 'This apparently did not equal each other';}?>