title: Jess in php code how?
body: <p>I am trying to embed an expert system in a site.</p>
  
  <p>My code for expert system is a Jess script (1.clp) like :</p>
  
  <pre><code> (defrule ask_input
              (initial-fact)
          =&gt;
              (printout t "Welcome " ?*answer* crlf)
          )
  </code></pre>
  
  <p>I use a form in php and I would like when I press submit button
  to run 1.clp via jess with variable fname from the form to be saved in ?<em>answer</em>.</p>
  
  <p>For example
  1.html</p>
  
  <pre><code> &lt;html&gt;
          &lt;body&gt;
          &lt;form action="welcome.php" method="post"&gt;
              Name: &lt;input type="text" name="fname" /&gt;
                    &lt;input type="submit" /&gt;
          &lt;/form&gt;
          &lt;/body&gt;
          &lt;/html&gt;
  </code></pre>
  
  <p>welcome.php</p>
  
  <pre><code>&lt;?php
  $name = $_POST["fname"];
  
  // connect with 1.clp
  ?&gt;
  </code></pre>
  
  <p>Any ideas ?</p>
  
  <p>Can I do the same somehow else ??
  Thanks in advance</p>