All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Indeed you did well by not aborting your child because abortion is forbidden as it is killing an innocent soul and causing corruption in the land. Allaah might indeed put a lot of good in this child.
We advise you to repent for committing fornication and keep away from the means that could lead you to commit the same sin again.
There is no doubt that the child who results from adultery or fornication is innocent about what had taken place, and it is not permissible to blame him for this. Some jurists stated that if a person accuses such a child of being born from adultery or fornication, the corporal punishment determined by Islamic Law should be applied on him. They argued that this is because the child is chaste and it is his parents who had committed the sin. The sin of the parents does not make the child unchaste. He is said to be born from adultery because it was due to such a sin that he was created and not that he himself is sinful.
The child born from adultery or fornication should be traced back to his mother, as she is responsible for nurturing him and spending on him, as he is the outcome of her sin with the man who committed fornication with her. So the mother has to bear the consequence of her sin, but both the fornicators are sinful. However, some jurists are of the view that the child should be attributed to the male fornicator if he marries the woman he committed fornication with, but in our view, this is not the most preponderant opinion, because the family lineage is a blessing which the male fornicator does not deserve. It is for this reason that the Prophet said: "The child is to be attributed to the mother [because she is not married] and the male fornicator gets frustration and despair." [Al-Bukhari and Muslim]
There is no harm for you to get married with this man if he had repented but the child is not going to be attributed to him according to the most preponderant opinion in our view as we have already clarified. As regards the fostering of the child, nurturing him and spending on him, this is your responsibility.
Allaah knows best.