function addUsers($params) {
$fnameval = $params->getParam(0);
$fname = $fnameval->scalarval();
$mnameval = $params->getParam(1);
$mname = $mnameval->scalarval();
$lnameval = $params->getParam(2);
$lname = $lnameval->scalarval();
if(mysql_query("INSERT INTO users(fname,mname,lname) VALUES('$fname','$mname','$lname')")){
$mess="data and synced successfully";}
else{
$mess="data saved but not synced as required";}
$response = array('response' => new xmlrpcval($mess, 'string'));
return new xmlrpcresp(new xmlrpcval($response, 'struct'));
}
Look at the above code. I intended to implement XML-RPC(xml remote procedure call) using php. the problem is that it takes time to parse a variable(see peocedure of getting $fname). is there a shorter way i can get the vairables directly e.g $fname=$params['fname'] without getting index then scalarval() ? help.
thanks.