It's been a long day, so I'm providing the following SQL, untested and off the top of my head, but I think you're probably looking for something like this:
SELECT
spouse1_info.first_name AS spouse1_first_name,
spouse1_info.family_name AS spouse1_family_name,
marriage_info.date_of_marriage,
spouse2_info.first_name AS spouse2_first_name,
spouse2_info.family_name AS spouse2_family_name
FROM table2 AS marriage_info
INNER JOIN table1 AS spouse1_info
ON marriage_info.persion_id = spouse1_info.id
INNER JOIN table1 AS spouse2_info
ON marriage_info.spouse_id = spouse2_info.id
However, if your marriage info table has a record for each spouse, then you're going to see the relationship show up twice in your results, like
Bob, Jones, 1988-01-02, Sally, Jones
Sally, Jones, 1988-01-02, Bob, Jones
If that's a problem, then you should consider just storing the marriage_id in table1 for each person and get rid of the person_id and spouse_id fields in table2. In fact, that makes more sense than the method above.
Also, make sure you're cleaning the values in those variables before using them in your SQL queries. As your code stands right now, you're quite vulnerable to SQL injection attacks.