Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''information' WHERE 'id' = 'SELECT `id` FROM `account` WHERE `username` ='stswil' at line 1
The problem comes from
$id = "SELECT `id` FROM `account` WHERE `username` ='$username' ";
$IDquery = " SELECT 'id' FROM 'information' WHERE 'id' = '$id' ";
In second line, the
$id
is replaced by its contain, second line become.
$IDquery = " SELECT 'id' FROM 'information' WHERE 'id' = 'SELECT `id` FROM `account` WHERE `username` ='$username' ' ";
Need to know what was your intend there to understand what is wrong.