Open GoogleCodeExporter opened 8 years ago
In HTML File either remove hook for on Completion
I mean remove or comment this
webcam.set_hook( 'onComplete', 'my_completion_handler' );
or remove code from my_completion_handler() javascript function to not show
image
Original comment by ashwin.r...@gmail.com
on 2 Jun 2011 at 4:47
The way this code works and starts the webcam and takes the picture and
allows for saving the image, do you by any chance hav a similar code for
fingerprint reader. I want a code that starts the fingerprint reader when a
page is loaded and allows for saving the fingerprint on the click event of a
button.
Original comment by khushish...@gmail.com
on 7 Jun 2011 at 5:52
This is my code for test.php
<?php
$fname = $_POST['txtFname'];
$lname = $_POST['txtLname'];
$pno = $_POST['txtUname'];
$pwd = $_POST['txtPwd'];
$rpwd =$_POST['rtxtPwd'];
$grade = $_POST['txtgrade'];
$des=$_POST['desig'];
$dep=$_POST['select'];
$gender=$_POST['rad1'];
$dateOB=isset($_REQUEST["date1"]) ? $_REQUEST["date1"] : "";
$dateOJ=isset($_REQUEST["date2"]) ? $_REQUEST["date2"] : "";
$filename = 'Employee_pics/'.$_POST['txtUname'].date('YmdHis') . '.jpg';
if(!is_numeric($pno))
{
echo "Invalid Personal Number";
}
else if($pwd !== $rpwd)
{
echo "Password not Match";
}
else
{
// encrypting the password //
//$pwd = md5($pwd);
// connecting to database //
$host="localhost"; // Host name
$user="root"; // Mysql username
$pass=""; // Mysql password
$db_name="hospital"; // Database name
$tbl_name="personal_table"; // Table name
// Connect to server and select databse.
$con = mysql_connect("localhost","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("$db_name")or die("cannot select DB");
// checking username existance //
$result=mysql_query("select * from $tbl_name where pno=$pno");
$count = mysql_num_rows($result) ;
//$result = mysql_query($sql,$con);
if($count==0)
{
// inserting user into tbl_user //
$sql1 = "insert into $tbl_name (pno, desig, grade, fname, lname, dob, dept, password, doj, gender, img ) values('$pno','$des','$grade','$fname','$lname','$dateOB','$dep','$pwd','$dateOJ','$gender','$filename')";
if (!mysql_query($sql1,$con))
{
die('Error: ' . mysql_error());
}
else
{
$result = file_put_contents( $filename, file_get_contents('php://input') );
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . $filename;
print "$url\n";
if (!$result) {
print "ERROR: Failed to write data to $filename, check permissions\n";
exit();
}
}
}
else
{
echo "Pno already exists.";
}
mysql_close($con);
}
?>
but when the code is executed the image saved is an invalid image.
please help
Original comment by khushish...@gmail.com
on 9 Jun 2011 at 6:01
Original issue reported on code.google.com by
khushish...@gmail.com
on 2 Jun 2011 at 10:29