how would I go about about grabing information from a link then relaying it back to the mysql every 30 seconds then echo it back to a page?

say the the link is chats.php?room=Bing&topic=anything&cat=GN&users=5

it put room bing topic anything cat GN users 5 in the mysql
then relay it back to another page called roomlist.php but if the room is in GN it and the roomlist is roomlist.php?GN it only display what is in GN

same if the link was chats.php?room=test&topic=ding&cat=RM&users5
and the roomlist is roomlis.php?RM then it relay only what in RM