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";
}