My code:
<?php
session_start();
include('connection.php');
$vrager_id = $_SESSION['vrager_id'];
$aanbieder_id = $_GET['aanbieder_id'];
echo $vrager_id. '<br>';
echo $aanbieder_id.'<br>';
mysql_query("INSERT INTO match
(aanbieder_id, vrager_id) VALUES ('$aanbieder_id', '$vrager_id' ) ")
or die(mysql_error());
mysql_close($mysql);
?>
My output:
6
64
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match (aanbieder_id, vrager_id) VALUES ((' 64 ','6'))' at line 1
I also included a picture of my database if that somewhat helps: