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


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

5 Years
Discussion Span
Last Post by uselessninja

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

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

This topic has been dead for over six months. 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.