php - Warning: PDOStatement::execute(): message: Unclosed quotation mark after the character string -
how sanitize data won't cause errors? i'm running ubuntu, php 5.3 , connecting mssql.
this code:
$body = $this->get_part($imap, $b, "text/html"); if($body == "") { $body = $this->get_part($imap, $b, "text/plain"); } $header = imap_headerinfo($imap, $b); $subject = $header->subject; $fromaddress = $header->fromaddress; $body = str_replace("'", "''", $body); //$body = str_replace("\"", "\"\"", $body); ///////////////////////////// $data = array('content'=>$body); $query = $pdo->prepare('insert [tbl_test] (content) values (:content)'); $query->execute($data); break;
Comments
Post a Comment