title: passing canvas image to php
body: <p>I'm going to upload the canvas image into MYSQL. By using php, but before that, how can I pass the canvasData to php. I've done some searching, but some of the solution are complicated for me. That's why I decide to post a question on here. I'm doing in a localhost environment. </p>
  
  <p>There is a <code>capture</code> button when click on it, will activate this function. It will capture the canvas photo. </p>
  
  <pre><code>function()
  {       context.drawImage(video, 0, 0, 300, 200);
          var canvasData = canvas.toDataURL("image/png");
  }
  </code></pre>
  
  <p>as I know right now the canvasData variable will be base64 code.</p>
  
  <p>What is the best solution for me to pass this data to php for me to upload to my database.
  Thank You in advance.</p>