PHP codes for capturing and saving image from computer's camera.?

Leoj

New member
I am developing a Library System and I don't know the codes on how to capture an image from computer's camera and directly save it in the database..I'm using PHP language...I dont want to use flash because I have no Idea about that...I just want PHP codes for it to run....Could you guys over there help me 'bout this matter?...I would greatly appreciate your response!..
 
that's great idea u r working on. i havn't tried it yet.

i have only tried to take take the images from computer folder and save to server.

$allowedExts = array("jpg", "jpeg", "gif", "png");
$extension = end(explode(".", $_FILES["bookimage"]["name"]));
if ((($_FILES["bookimage"]["type"] == "image/gif")
|| ($_FILES["bookimage"]["type"] == "image/jpeg")
|| ($_FILES["bookimage"]["type"] == "image/pjpeg"))
&& ($_FILES["bookimage"]["size"] < 50000)
&& in_array($extension, $allowedExts))
{
if ($_FILES["bookimage"]["error"] > 0)
{
echo "Return Code: " . $_FILES["bookimage"]["error"] . "<br />";
}
else
{


if (file_exists("../bookimages/" . $_FILES["bookimage"]["name"]))
{
echo $_FILES["bookimage"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["bookimage"]["tmp_name"],
"../bookimages/" . $_FILES["bookimage"]["name"]);
echo" <div class='valid_box' style='width:50%'><font face='calibri' size='2' >Successfully uploaded the Image of Book!</font></div>";
}
}
}
else
{
echo "Invalid file";
}
 
Back
Top