You can't send the data to <input> fields, you have to send it to the php whatever script directly, using preferably POST.
code:
var http = new ActiveXObject("Microsoft.XMLHTTP");
http.open ("POST", postaddress, true);
http.send (postdata);
Something like that.
Securing it, could only be done by using SSL, but you need a server that can handle SSL traffic.