Hi,
Just FYI this is an extremely dangerous way to achieve that!
You are effectively performing a database INSERT/UPDATE at the top of the page, and then a SELECT back again in the header. Not only is this an extremely slow and inefficient way to build a page, it is also in no way thread-safe.
For example – if two people ask for different pages at the same time, it is quite possible that page 1 will write it’s name to the database, then the server will suspend processing of that thread and begin processing page 2, write that name ot the database over the top of page 1’s, then pause and continue building page 1 – but page 1 will now retrieve page 2’s name from the database. There is no way to predict what will actually occur, and it will only get more weird and wrong the heavier the load on the server.
Cheers,
Tom.