PHP Classes

File: ajax/setFinished.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Netflix Clone   ajax/setFinished.php   Download  
File: ajax/setFinished.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: 459 bytes
 

Contents

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

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

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