It is doable using jQuery, or if you want the simplest way that I can think of:
The form posts to php1
php1 uses the values it needs
then it does a curl post to php2 with all the values from the form
php2 uses the values it needs
end

Shouldn't be too hard to fix