PHP Classes

File: ajax/updateDuration.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Netflix Clone   ajax/updateDuration.php   Download  
File: ajax/updateDuration.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Netflix Clone
Manage a library of movies to rent like Netflix
Author: By
Last change:
Date: 2 months ago
Size: 560 bytes
 

Contents

Class file image Download
<?php
require_once("../includes/config.php");

if(isset(
$_POST["videoId"]) && isset($_POST["username"]) && isset($_POST["progress"])) {
   
$query = $con->prepare("UPDATE videoProgress SET progress=:progress,
                            dateModified=NOW() WHERE username=:username AND videoId=:videoId"
);
   
$query->bindValue(":username", $_POST["username"]);
   
$query->bindValue(":videoId", $_POST["videoId"]);
   
$query->bindValue(":progress", $_POST["progress"]);

   
$query->execute();
}
else {
    echo
"No videoId or username passed into file";
}
?>