You are suffering with constipation
Please take high fiber diet,plenty of liquids.
If the jelly like thing is more,you have to use antibiotic like levofloxacin
For abdominal pain
,you have to take Antispasmodic like Dicyclomine.
Get an ultrasound abdomen and rule out any pathology inside
Wish you good health