It is perfectly legal to get married to a US citizen or permanent resident and obtain permanent residency in the United States . This type of marriage is often called a green card by marriage. You must understand, however, that your so called green card marriage will only be valid for immigration purposes if it was not a mere sham to obtain
an immigration benefit. To that extent the term “green card marriage is often misunderstood—it is absolutely legal to obtain an immigration benefit by getting married, so long as the main purpose of your marriage was a traditional one, that is, for love and affection It cannot be for the sole purpose of obtaining the immigration benefit.