I was using this function before adding anything to the cart.. product name or id or anything..
function quote_smart($string)
{
$string = html_entity_decode($string);
$string = strip_tags($string);
$string = trim($string);
$string = htmlentities($string);
$string = preg_replace('/\s+/', ' ',$string); // Removing more than one space/Tab.
// Quote if not integer
if (!is_numeric($string))
{
$string = mysql_real_escape_string($string);
}
return $string;
}
I just removed it and it worked!! Thanks evryone for your answers.