Hi every one,
I want to take a photo by using webcam , and I want to store it in db and finally I want to view it. How to do?
Its urgent.

Its not urgent to anyone for as long as there is no evidence of some attempt at working it out.
where is the webcam
where is the db
what is the db structure you have worked out
generally: what have you attempted

coder gets paid heaps for urgent coding jobs
but everybody here will help you work it out gratis

beginners hints
images can be stored in the filesystem with a link stored in the db
ajax: jquery can upload the files

I had good results tweaking this added a few lines to the script to be able to view all the images in the folder

worth a look?