Had a period

Hello guys.. I took my pregnancy test today morning and it was positive.. and by today evening I am bleeding.. not so less not so much.. I went to the doctor and she done the ultrasound scan.. and she said the baby is still existing in my womb if my bleeding doesn't stop I will lose the baby... I just wanted to know what you ppl think.. and if it happened to you what you have done at that time.. please suggest me something.. I am so scared