The code below displays a signature on the screen previously signed on the form before. It has now displayed the image as a png. How do i go about saving the image into a mysql database field so i can recover the picture as and when i need to / or even if easier save the file to the server in a folder called signatures under a file name of my choice i.e by orderidno variable.

any help is greatfull

kardklub

<?php

require_once 'signature-to-image.php';
$output = $_POST['output'];
$img = sigJsonToImage($output);

// Save to file
imagepng($img, 'signature.png');

// Output to browser
header('Content-Type: image/png');
imagepng($img);

// Destroy the image in memory when complete
imagedestroy($img);
?>

You shared your ideas? What is the problem? What did you decided to do? To save the binary data in database, or in file system? And really what was the question?

Ummm, dont understand your comment??? but yes i have solved this issue .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.