I create the Signature Pad using <https://laratutorials.com/signature-pad-php-mysql-jquery/>.
The problem is when I click submit, the signature image path can't save into database.

Here is the code for upload.php

```
<?php
include_once '../db_connect.php';

$folderPath = "upload/";

$image_parts = explode(";base64,", $_POST['signed']);

$image_type_aux = explode("image/", $image_parts[0]);

$image_type = $image_type_aux[1];

$image_base64 = base64_decode($image_parts[1]);

$file = $folderPath . uniqid() . '.'.$image_type;
$sql="INSERT INTO works (sign) VALUES ('$file') WHERE id=1";
mysqli_query($con,$sql);

file_put_contents($file, $image_base64);
echo "Signature Uploaded Successfully.";
?>

```

Any one can help?