title: How to attach a file in HTML?
body: <p>I have an assignment wherein I'll make a website that will enable the user to attach file and save it to the database. I'm doing some research and found out that I'll need to use PHP and MySQL/SQL for my database. The bad thing here is that I don't know how to use PHP.</p>
  
  <p>Can someone help me in coding to attach a file from the documents of the user and will save it to the database?</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt; 
      &lt;title&gt;Attach file&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;table width="450px"&gt;
          &lt;tr&gt;
              &lt;td valign="top"&gt;
                  &lt;label for="attach_file"&gt;&lt;b&gt;Attachment *&lt;/b&gt;&lt;/label&gt;
              &lt;/td&gt;
              &lt;td valign="top"&gt;
                  &lt;input type="submit" value="Attach File"&gt;
              &lt;/td&gt;
              &lt;td valign="top"&gt;
                  &lt;label for="attach_file"&gt;No file selected&lt;/label&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td valign="top"&gt;
                  &lt;label for="app_name"&gt;&lt;b&gt;Application Name *&lt;/b&gt;&lt;/label&gt;
              &lt;/td&gt;
              &lt;td valign="top"&gt;
                  &lt;input  type="text" name="app_name" maxlength="50" size="30"&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td valign="top"&gt;
                  &lt;label for="desc"&gt;&lt;b&gt;Description &lt;/b&gt;&lt;/label&gt;
              &lt;/td&gt;
              &lt;td valign="top"&gt;
                  &lt;textarea  name="desc" maxlength="1000" cols="25" rows="6"&gt;&lt;/textarea&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td colspan="4" style="text-align:center"&gt;
              &lt;br&gt;&lt;br&gt;
                  &lt;input type="submit" value="Submit"&gt;   
              &lt;/td&gt;
          &lt;/tr&gt;
  
      &lt;/table&gt;
  
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>