Why would you even consider using code from a Stackoverflow question with zero accepted answers?
As I stated earlier, the Magnific Popup Ajax type CANNOT be used to submit a form. Only to make a GET request. (OK, technically, it COULD - IF you first create URL parameters from the form, and IF your server will accept a GET rather than a POST... In any case, in order to use the popup Ajax type, you will need to supply a complete, fully-formed URL in src, and there is no way to provide a body).
Is there some reason you insist on using Ajax type rather than inline type? Is this a class assignment? (If so, post the class assignment, verbatim.)
Forget the SO question with zero accepted answers. Start with the Magnific Popup documentation. Ask questions about what parts you don't understand.
Actually, start with getting the Ajax request to work as you want, and just put the result into a console.write() to verify what you are getting from your server.
You CANNOT put a "full page" into the popup. It will make invalid HTML, as you would now have multiple <head> and <body>. You will first need to extract the part of the page that you want to put into the popup. (Perhaps the entire content of <body>).