Skip to content

Commit

Permalink
fix a bug where users cant change settings
Browse files Browse the repository at this point in the history
this took me 2 hours yesterday, then today I realised that it was such a simple mistake, when I removed videojs I forgot to remove a "s" from the sql query preparation code
  • Loading branch information
GoldDominik893 committed Jun 16, 2024
1 parent 10640a2 commit fa94e9d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
if($result->num_rows) {
}
$stmt = $conn->prepare("UPDATE login SET customtheme_player_url = ?, customtheme_home_url = ?, theme = ?, lang = ?, region = ?, proxy = ?, videoshadow = ?, loadcomments = ? WHERE username = ?");
$stmt->bind_param("ssssssssss", $customthemeplayerrow, $customthemehomerow, $theme, $lang, $uregion, $torfproxy, $uvideoshadow, $uloadcomments, $dbsenduser);
$stmt->bind_param("sssssssss", $customthemeplayerrow, $customthemehomerow, $theme, $lang, $uregion, $torfproxy, $uvideoshadow, $uloadcomments, $dbsenduser);
if ($stmt->execute() === TRUE) {
} else {
echo "Error: <br>" . $conn->error;
Expand Down Expand Up @@ -424,9 +424,6 @@
$conn->close();
}


?>
<?php
$dbsenduser = $_SESSION['logged_in_user'];
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
Expand Down

0 comments on commit fa94e9d

Please sign in to comment.