-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
billzyj
committed
Nov 19, 2021
1 parent
22a6e03
commit 6d757e2
Showing
5 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
require_once("files/main.php"); | ||
$vidId = (int)$_GET['Id']; | ||
$checkquery = $con->prepare("SELECT * from favorites where userName='$loggedInUserName' and videoId = '$vidId'"); | ||
$checkquery->execute(); | ||
if ($checkquery->rowCount() > 0) { | ||
$query = $con->prepare("DELETE FROM favorites WHERE userName='$loggedInUserName' and videoId = '$vidId'"); | ||
$query->execute(); | ||
header("location:watch.php?Id=$vidId&delete=success"); | ||
} else { | ||
echo "Video is already not in favorites"; | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters