Gathering and saving eSignatures from an HTML form with Ajax, PHP & jQuery

For this example I show how to create an e-signature form where users can sign a form and then the signature is sent back to the database or server. I used HTML to construct the form and javascript to do AJAX calls with jQuery and the help of PHP. Below is the Javascript code that gets the image from the first location and saves it with the use of another php file called 'save_sign.php'.




Here in 'save_sign.php'  I get the image, decode it and save the signature snapshot image as a .png file in a folder I created called doc_signs.







Here I have the output being reflected from the database. Every time a new signature is saved they are put in that document signature folder. So here for showing the concept, I am reflecting the signatures as they get saved right back onto the page. In a production app from here the only thing left to do is to know where the specific project wants to route the signatures. It may suffice to just save the document signatures along with the other customer sign-up or purchasing data.


Comments

Popular posts from this blog

Automated Exploitation of a Bluetooth vulnerability that leads to 0-click code execution

Sniffing GSM traffic on a private cellphone network

Raspberry Pi WiFi Honeypot 🍯