how to get info saved to database (my code is not working)

im gonna do this short as maybe i messed it up and i'm not seeing the problem.
        // ** Save to database how **//
		  //var name = $("#name").val();
		  var image_info = signaturePad.toDataURL();
		  var dataString = 'image='+image_info+'';
		    success:function(data) {

Open in new window

alert(signaturePad.toDataURL()); alert fires fine. doesn't seam to be running the save_to_mysqli.php file
how can i debug this to find out if its working, and or is there something wrong with code i'm using.
i am trying to use jquery inside javascript i have jquery loaded with <script src="" type="text/javascript"></script>
the code of
if (jQuery) {alert("jQuery library is loaded!");} else {alert("jQuery library is not found!");}

Open in new window

fires off fine
what am i missing that this is not working please
thank you in advance for any code or help you may provide.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you have a link to look at?
JohnnyAuthor Commented:

its the save part im having issues with
Ray PaseurCommented:
jQuery is JavaScript.  Please show us the PHP that is in this script:

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

In this function
saveButton.addEventListener("click", function (event) {

You are passing the object as event but later on you are targeting just e

This should be
JohnnyAuthor Commented:

    // version:
$link = mysqli_connect("localhost", "local_xxxx", "xxxxx", "local_xxxxx");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());

//mysqli_query($link, "CREATE TABLE myCity LIKE City");

$query = "INSERT INTO signatures VALUES (NULL, 'FakeName Johnny', '".$_POST['image']."', NULL, '".$_SERVER['REMOTE_ADDR']."', NOW(), NULL)";
if (mysqli_query($link, $query)) 
printf ("New Record has id %d.\n", mysqli_insert_id($link));
//printf("query failed: %s\n", mysqli_error());
//echo "error need to find out how to print mysqli error";
throw new Exception(mysqli_error($link));

/* drop table */
//mysqli_query($link, "DROP TABLE myCity");

/* close connection */

Open in new window

JohnnyAuthor Commented:


is commented out is it need for the function to operate and also changed to event.preventDefault();?
In the page you linked to it is not commented out.
You've amended the page now but now you have

404 Not found -

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JohnnyAuthor Commented:
@ GaryC123
that was it i had the wrong path for the save file..
i dont think i would have ever od found it thank you
JohnnyAuthor Commented:
thank you again
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.