title: Input to txt-file, txt-file to list element
body: <p>I am new to PHP and have a question about how to append information to a <code>.txt</code> file using a form with a button with <code>type="button"</code>, the appending should be <code>;</code> separated in the <code>.txt</code> file. Can someone help me on how to accomplish the appending from the form to the <code>.txt</code> file?</p>
  
  <p>(Each time you fill out the form and append the information to the <code>.txt</code> file a list-element should be created beside the form and containing only the information of the two first input-elements, taken from the <code>.txt</code> file). The form looks like this:</p>
  
  <pre><code>&lt;?php
      include("header.php");
  ?&gt;
  
          &lt;form id="info" method="post" action=""&gt;
                  &lt;p id="formrubrik"&gt;Add information here:&lt;/p&gt;&lt;br/&gt;
                  &lt;p&gt;Title:&lt;/p&gt;
                  &lt;textarea class="field" id="title" name="names" rows="1" cols="20"&gt;&lt;/textarea&gt;&lt;br/&gt;&lt;br/&gt;
                  &lt;p&gt;Grade&lt;/p&gt;
                  &lt;select class="field" name="grade" id="star"&gt;
                      &lt;option value="0"&gt;Choose grade...&lt;/option&gt;
                      &lt;option value="1"&gt;1&lt;/option&gt;
                      &lt;option value="2"&gt;2&lt;/option&gt;
                      &lt;option value="3"&gt;3&lt;/option&gt;
                      &lt;option value="4"&gt;4&lt;/option&gt;
                      &lt;option value="5"&gt;5&lt;/option&gt;
                  &lt;/select&gt;&lt;br/&gt;&lt;br/&gt;
  
                  &lt;p&gt;Link:&lt;/p&gt;
                  &lt;textarea class="field" id="link" name="links" rows="1" cols="20"&gt;&lt;/textarea&gt;&lt;br/&gt;&lt;br/&gt;
  
                  &lt;p&gt;Photo link:&lt;/p&gt;
                  &lt;textarea class="field" id="picture" name="photo" rows="1" cols="20"&gt;&lt;/textarea&gt;&lt;br/&gt;&lt;br/&gt;
  
                  &lt;p&gt;Description:&lt;/p&gt;
                  &lt;textarea class="field" id="handling" name="description" rows="3" cols="20"&gt;&lt;/textarea&gt;&lt;br/&gt;&lt;br/&gt;
  
                  &lt;button value="0" id="add" type="submit"&gt;Save&lt;/button&gt;&lt;br/&gt;
  
              &lt;/form&gt;
  
              &lt;div id="list_elements"&gt;
  
                  &lt;ul id="elements"&gt;
                  &lt;/ul&gt;
  
              &lt;/div&gt;
  
  &lt;?php
      include("footer.php");
  ?&gt; 
  </code></pre>