0

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);
?>

Edited by kardklub: added code

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by kardklub
0

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?

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.