I'm facing an odd problem....
$string is user input
$log = serialize(array('string' => $string);
example: "test" would be
"string";s:4:"test";
However problems arise when the user submits quotes and some other characters like ; Of course I escape the string first, but the serialized data cannot be unserialized.
htmlentities before submitting to db wouldn't work either since ; messes up the data...
Any suggestions?
Please don't tell me to create db fields and not use serialize()
 
     
     
     
    