title: How to post data to php service...SOAP
body: <p>Below i have written code of a soap webservice in php with its client,It is working fine, actually m new to php so don't know how to post data to my server php service from html page, i know by using javascript it is possible but how.....any help by code or helpful  link will be appreciated.  </p>
  
  <pre><code>&lt;?php
  require_once "lib/nusoap.php";
  
  function getProd($username,$password) {
     $user = "root";  
  $pswd = "root";  
  $db = "LOGIN";  
  $conn = mysql_connect('localhost', $user, $pswd);  
  mysql_select_db($db, $conn);  
  //run the query to search for the username and password the match  
  $query = "SELECT * FROM PEOPLE WHERE USERNAME = '$username' AND PASSWORD = '$password'";  
  $result = mysql_query($query) or die("Unable to verify user because : " . mysql_error());  
  //this is where the actual verification happens  
  if(mysql_num_rows($result) &gt; 0)  
    $valid="LoginSucessful";
    else
    $valid="LoginFailed";
    return $valid;
  }
  
  $server = new soap_server();
  $server-&gt;configureWSDL("productlist", "urn:productlist");
  
  $server-&gt;register("getProd",
      array("username" =&gt; "xsd:string","password" =&gt; "xsd:string"),    
      array("return" =&gt; "xsd:string"),
      "urn:productlist",
      "urn:productlist#getProd",
      "rpc",
      "encoded",
      "Get a listing of products by category");
  
  if ( !isset( $HTTP_RAW_POST_DATA ) ) $HTTP_RAW_POST_DATA =file_get_contents( 'php://input' );
  $server-&gt;service($HTTP_RAW_POST_DATA);
  
  
  
  
  
    #client of service#
  
   &lt;?php
  require_once "lib/nusoap.php";
  $client = new nusoap_client("http://localhost/expa/productlis.php");
  $result = $client-&gt;call("getProd",array("category" =&gt; "admin","item" =&gt; "admin"));
  
  
  
  Overall just need to pass parameter to the php function.
  </code></pre>