I wrote a web page that is meant to be like a survey that submits both entries in html text boxes as well as images of canvas drawings. Currently I have my PHP file transferring from the HTML form via 'Post' to plug into the database once "Submit" is pressed. In the script inside my HTMl file, I convert the canvas drawing through "var dataURL = canvas.toDataURL();".
I was wondering how I would go about (hopefully using the same PHP file) sending the var dataURL to mySQL alongside the my HTML form. I'm also not entirely sure how the dataURL should be stored in mySQL as well. But the goal is to make an entry like "ID, Name, Image (dataURL)". I'm still pretty new to PHP, and I heard AJAX is usually used but i'm not sure how to make that work alongside the HTML form.
Any help is appreciated, Thank you!