Constipation can be cured simply by lifestyle changes.
Medications should ideally be taken in the interim period, while you change your lifestyle.
Next Steps
Drink atleast 3-4 litres of water per day.
Regular (daily) exercise.
Healthy diet with high fibre.
Take a fibre supplement while you regularise the above changes.
If you still suffer from constipation after 1 month, please visit a surgeon/ gastroenterologist.