I have an image in canvas but want to upload it to database. I have no problem with upload when it's classical (trough <input type='file'>).
I know how to download it from canvas, but have problem with upload from it.
Also, after fooling around with image in canvas, some form should be filled.
Nothing special it's for, some marketing campaign, where you upload photo, put some filters and frames, than upload it.
.toDataURL()method of the canvas..toDataURL, (2) transmit that string to a.phpscript on your server with AJAX -- jQuery does this well, (3) create a parametized MySQL statement to store the encoded string to your database. Your question has been asked + answered many times on Stackoverflow. Here's one example post: stackoverflow.com/questions/24575090/…. You can add the form data to your AJAX data packet and have your php store them with the canvas dataUrl.