Salam,
In Christianity he was never married to Mary Magdalene. Even if in the "gnostic" books, I don't think they were ever married or had a relationship. at least, it wasn't stated explicitly, though some disciples alluded to it and it says Jesus loved her more than all the others. She's not mentioned in Islam. Doesn't mean she didn't exist, but perhaps her role was too small to mention. I believe in Christianity, her main role in the life of Jesus was that she was the one who discovered his empty tomb, if I remember correctly. Obviously this isn't a part of Islam, so her name just doesn't appear.
There's interesting historical evidence to indicate that she existed. I'm sure someone named Mary, of Magdalene, existed during the time of Jesus, but I don't know if she knew him or what role she would have played in his life, if any.
Since the hype and popularity of The da Vinci Code, it's practically a part of non-mainstream, gnostic Christianity these days (usually among younger people) to throw out the Jesus-Mary Magdalene dynamic, like it's an accepted fact. When I was younger I read TONS of books on the topic (and still have them all - they take up an entire book shelf lol). I'll admit that it is a very tantilizing idea, but, I think the evidence is weak overall.