Kathy,
On the second page you are linking to you would put your sql statement as you would any page. then in your link you would put
<a href="../mainlist2.php3?FieldName=??&FieldName=??">
now you can put any thing you want as long as it is in the DB. I don't know if this will help?
Brett