You should encode the image path as it is a url and the colour as it contains a #
(use encodeURIComponent)
Your query string seems all messed up, you pass color
, url
and img_path
but expect color
, img_path
and title
Also
var url = "update.php?color="+encodeURIComponent(color)+
"&img_path="+encodeURIComponent(img_path)+"&title="+title;