All pastes #562131 Raw Edit

Mine

public php v1 · immutable
·published 2007-06-12 18:19 UTC
rendered paste body
    $hid = $this->id;    $obj = data::tep_db_query("SELECT headline_id,active,comments_active FROM ".TABLE_HEADLINES."                              WHERE headline_id = $hid                               AND active = 1                               AND comments_active = 1");        if (mysql_num_rows($obj)) {      $hlName = $_POST['comName'];      $hlMail = $_POST['comMail'];      $hlWeb = $_POST['comWeb'];      $hlComment = $_POST['comment'];      if ($_SESSION['captcha_spam'] == $_POST['comCaptcha'] && $_POST['comSubmit'] == "OK") {        if (core::formValidation($hlName, $hlMail, $hlComment)) {          $obj = data::tep_db_query("INSERT INTO ".TABLE_HEADLINES_COM."(headline_id,poster_name,poster_mail,poster_url,poster_text,active,adddate)                                     VALUES($hid, '$hlName', '$hlMail', '$hlWeb', '$hlComment', 1, UNIX_TIMESTAMP());");          if (mysql_insert_id())             header('Location: ?'.$_SERVER['QUERY_STRING']);          else            die(mysql_error());        } else {        }      } else {              }