Add survey
This commit is contained in:
parent
40bc1eb615
commit
ffcc6e5ce3
@ -312,16 +312,18 @@ function updateUserProfile(string $firstName, string $lastName, string $nickname
|
|||||||
$status = ["Status" => "Fail"];
|
$status = ["Status" => "Fail"];
|
||||||
|
|
||||||
if (isLoggedIn() && !empty($firstName) && !empty($lastName) && !empty($nickname) && !empty($minecraft_nickname)) {
|
if (isLoggedIn() && !empty($firstName) && !empty($lastName) && !empty($nickname) && !empty($minecraft_nickname)) {
|
||||||
$userID = $_SESSION["ID"];
|
|
||||||
|
|
||||||
$stmt = $mysqli->prepare("UPDATE Users SET FirstName = ?, LastName = ?, Nickname = ?, MinecraftNick = ? WHERE ID = ?");
|
$stmt = $mysqli->prepare("UPDATE Users SET FirstName = ?, LastName = ?, Nickname = ?, MinecraftNick = ? WHERE ID = ?");
|
||||||
/** @noinspection SpellCheckingInspection */
|
/** @noinspection SpellCheckingInspection */
|
||||||
$stmt->bind_param("ssssi", $firstName, $lastName, $nickname, $minecraft_nickname, $userID);
|
$stmt->bind_param("ssssi", $firstName, $lastName, $nickname, $minecraft_nickname, $_SESSION["ID"]);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
if ($stmt->affected_rows > 0) {
|
if ($stmt->affected_rows > 0) {
|
||||||
$status["Status"] = "Success";
|
$status["Status"] = "Success";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$status["Status"] = "Failing";
|
||||||
|
}
|
||||||
|
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user