hi..i've searched google for this and yeah..google give me what i expected.. but
it is possible to capture a screenshot from webcam and passing it to php and then saving it to database..

picture --> javascript --> php --> database

or

picture --> javascript --> database (well i dont know if it can talk to db )

can someone help me on this?..i know php but i have too little javascript know how

Recommended Answers

All 5 Replies

Javascript can't connect direct with the database.

You have to send the data to the PHP page that will handle it.

You can use JQuery to do it cleanly with AJAX.

// Send a post request to PHP_PAGE.PHP with the image data
$.post("PHP_PAGE.PHP", { image: myImageVar }, 
    function(response) // handle the return of the AJAX request. response is the data that the page printed
    {
        alert(response);
    }
);

Hope it helps.

uh... i have little knowledge of javascript...yet you give me an AJAX... :|

AJAX is pretty simple my friend and with JQuery you can do it with just one hand =)

The code that i wrote you will do the AJAX request passing the image data to the PHP page, and the result of the request will be alerted.

You just have to import jquery on your page =)

uhmm thankzz anyway... i think i must learn javascript first before ajax and jquery (i know its not a prerequisite for the two).. i got 2 days left .. i hope i can do it

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.