Either you're doing something way over my head or you're missing some basic concepts.
Web pages don't have a main() function. Variables passed to the page (e.g. through the address or posted form fields) are automatically accessable in the called page, normally as individual variables and/or as part of an array, depending on your setup.
Any basic tutorial on PHP would probably cover variable passing.