File: examples/save_cam_captures/php/capture.php

Recommend this page to a friend!
  Classes of Juan Chaves   JE5   examples/save_cam_captures/php/capture.php   Download  
File: examples/save_cam_captures/php/capture.php
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: JE5
jQuery plugin to generate canvas, audio and video
Author: By
Last change: Examples capture WebCam

Examples capture, view WebCam
Date: 2 years ago
Size: 659 bytes
 

Contents

Class file image Download
<?php //Conect to db $servername = ''; $username = ''; $password = ''; $conn = new mysqli($servername, $username, $password); mysqli_select_db($conn, 'pru_je5_stream'); if ($conn->connect_error) { die('Error: ' . $conn->connect_error); } else { if($_POST['img'] != 'data:,' && $_POST['img'] != '') { //Save latest capture in img field and all captures in rec $sql = "UPDATE `streaming` SET `img` = '".$_POST['img']."', `rec` = CONCAT('".$_POST['img']."', `rec`) WHERE ID = 1"; if ($conn->query($sql) === TRUE) { echo 'New image inserted'; } else { echo 'Error: ' . $sql . ' ' . $conn->error; } } } $conn->close(); ?>