Referencing a php file from a form

#1

I am creating a form on a Wordpress page and want to reference a php script. Where should I put the script?

#2

at the place you are referencing it.