I\'ve a forum script that makes for every new topic a \"container\" and assign to it each post linked to the topic.
So, when I open a new topic my script makes a new row
Yes it is safe. Each PHP process uses separate connection and this variable contains inserted id from this very connection