title: Webservices in PHP and Oracle Database
body: <p>i want to create a web service to check if the login</p>
  
  <p>i create first an html form</p>
  
  <pre><code>  &lt;form action="webservice_ocl.php" method="post"&gt;
    &lt;p&gt;Username:
      &lt;input name="user" type="text" /&gt;
    &lt;/p&gt;
    &lt;p&gt;
      Password:
      &lt;input name="password" type="password" /&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;input type="submit" name="btnSubmit" id="btnSubmit" value="Submit" /&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>then i create a php file " webservice_ocl.php to do the traitement</p>
  
  <pre><code> &lt;?php
  session_start();
  try {
  $dbh = oci_connect('test', '123456', 'localhost/XE');
  } catch (PDOException $e)
  {
      echo $e-&gt;getMessage();
  }
  if ($_POST['user'] != null and $_POST['user'] != "" and $_POST['password'] != null and $_POST['password'] != "")
  {
  $username = $_POST['user'];
  $password = $_POST['password'];
  $sth = oci_parse($dbh ,"SELECT * FROM utilisateur WHERE LOGIN='$username' and PASS='$password'");
  oci_execute($sth);
  if(oci_fetch($sth)){
         echo "Nice";
      }
      else { echo "nono";}
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>i want to konw , the php file " webservice_ocl.php " is a webservice ??</p>
  
  <p>and how to call them in html using ajax ??</p>
  
  <p>i want to use this on mobile developpement</p>