PHP bug or something else

I am having a problem with PHP. There is a HTML form with radio buttons that is connected to the database. Everything works fine, except that form or PHP always displays result from the query in the last added function. When I remove function by function, it always displays result from the last one in order. I’ve been dealing with this for over a month, so any kind of help or advice is more then welcome.
I am so confused and bothered with it, i don’t even know how or what to ask.
Thanks.

Hello dolap,

it’s hard to say exactly what could be happening without me looking at the code (could you post the relevant piece maybe?), but from the looks of it, something is either logging the query or you echo it our directly at some point, maybe with echo but it could also be the <?= ... ?> tag.

Otherwise, the only other option I’m thinking of is some kind of database logging enabled.

Hi, can you attach the source code file here?