alert(data.photoid); var selectedid = data.photoid; remove_image_fromdb(selectedid);