This is the quick hurrah. I will later write a longer post on how to get a single tile feature from mapserver. If you have been hitting your head against the wall trying to find this out for hours, then you will get what I will say.
1. You are going to use the cgi program. I still haven't figured out how to server tiles using MapScript
2. You are going to use variable substitution, whose information is documented in a koan-manner on this page http://old-mapserver.gis.umn.edu/doc/mapfile-reference.html#variablesubs...
Filter "%funkyvar%"
3. How do you set your variable at the end of the get string
http:/foo.com/mapserver.blahblahblah&funkyvar=foo, as described here http://n2.nabble.com/Variable-Substitution-td1987248.html#a1987248
And you are done.
Bonus rant: finding info for mapserver should get you a library science degree in the process
Bonus info: Search for their information on Nable http://n2.nabble.com/MapServer-f1969210.html