Hi Adam,
"and what tool/interface I need for this" : any particular interface or tool. Just the PHP page where you receive your form datas + a PHP page where you'll write all methods(functions) you need (and you must have NuSOAP library too, of course ^^).
So, in the first PHP page with your form datas :
<?php
//the following require_once() path must be a relative path
require_once('../path/to/nusoap.php');
//the nusoap_client() must be an absolute URL
$nusoap = new nusoap_client("http://www.website.com/my_methods_page.php");
//here you make your datas array
$datas = array(
'name' => 'Bubu',
'job' => 'developper',
...
);
//Now, you call the method "registerUser" (in my_methods_page.php) by passing your datas array we'll just print_r()
print_r( $nusoap->call('registerUser',array( 'datas' => $datas )) );
?> |
Now, in my_methods_page.php :[/u]
<?php
//the following require_once() path must be a relative path
require_once('../path/to/nusoap.php');
//instanciate a new soap server
$server = new soap_server();
//declare all your existing methods (note that only methods called somewhere else than here must be declare. no need to declare privates)
$server -> register('registerUser');
//your method to register
function registerUser($datas)
{
//here your code to write in database. i just wrote a return for you to see the print_r() result : your sent datas array.
return $datas;
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
// Executes the RPC
$server -> service($HTTP_RAW_POST_DATA);
?> |
i hope it will help you (and hope i don't forget anything
)
BenoƮt
PS : sorry for my english