Good afternoon! I am storing some encrypted data using PHP to do the encryption and a MySQL database. I have encountered a couple of times where I get back a query sytax error.
INSERT INTO `test`.`tblEncTest` (`encAlg`, `encMode`, `encIV`, `reqName`, `reqSSN`, `reqEMail`) VALUES ( 'blowfish', 'cbc', 'â3IÂÂ}ÃÃ', 'à ÃpÃ_9', 'âËkÃÂfÃÃ?QÂÃgÃÂ', '-â%ÂÂ+AÂÅÂÃR'âHXâÃÃÃppT ÃÃÃ7 GHÂÅÅÃÃÃ' ) You have an error in your SQL syntax near 'HXâÃÃÃppT ÃÃÃ7 GHÂÅÅÃÃÃ' ) ' at line 1 Now, if you look closely you can see and additional single quote in ÃR'âHXâ. I cannot use addslashes() here can I? Or should I base64_encode each item and then decode on the way back out. Any thoughts would be appreciated. TVMIA!