title: html add item and show lists with using php
body: <p>I am new in HTML </p>
  
  <p>i want to make a user list web page. The page reads user.txt and show then left column of the tabel.</p>
  
  <p>And new items in which New User column will be added to user.txt list </p>
  
  <p>Instead of get/post http methos i am trying to use  2 AJAX methods to communicate the server side.</p>
  
  <p>After sending url with AJAX i will  call php scripts on the server side </p>
  
  <p>I think first AJAX method for adding is below</p>
  
  <pre><code>XMLHttpRequestObject.open("GET", dataSource);
  </code></pre>
  
  <p>However. I coulnt find the second. And i dont know how to implement</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;SCRIPT language="javascript"&gt;
  function add(nm, ml) { }
  function read(nam,mail) { }
  &lt;/SCRIPT&gt;
  
  &lt;html&gt;
  &lt;body&gt;
  
    &lt;table border = "1"&gt;
     &lt;thead&gt;
       &lt;tbody&gt;
          &lt;tr&gt;
            &lt;th&gt;Registered Users&lt;/th&gt;
            &lt;th&gt;New User&lt;/th&gt;
          &lt;/tr&gt;
  
           &lt;tr&gt;
            &lt;td&gt;&lt;/br&gt;&lt;/td&gt;
            &lt;td&gt;
                &lt;p&gt;&lt;label&gt;Name:
                     &lt;input name = "name" type = "text"&gt;
  
                &lt;p&gt;&lt;label&gt;Email:
                     &lt;input name = "email" type = "text"&gt;
            &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
           &lt;td&gt; 
            &lt;p&gt;&lt;/p&gt;
  
             &lt;button onclick="read()"&gt;Read users list&lt;/button&gt;
           &lt;/td&gt;
  
          &lt;td&gt; 
            &lt;p&gt;&lt;/p&gt;
  
            &lt;button onclick="add(name,email)"&gt;Add user to list&lt;/button&gt;
  
            &lt;p id="demo2"&gt;&lt;/p&gt;
          &lt;/td&gt; 
          &lt;/tr&gt;
       &lt;/tbody&gt;
     &lt;/thead&gt;
    &lt;/table&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>