You can not set php variable from html elements. You must post you page and call process.php page to process your form.
Now a days if you want to process form without posting, then you can use ajax.
XAJAX is ready to use ajax library, download, learn example and implement it in your code.
Help yourself by helping someone.