Skip to content
Snippets Groups Projects
Commit 0b2da844 authored by Bitha17's avatar Bitha17
Browse files

edit server side edit profile

parent b6926a9c
No related merge requests found
......@@ -82,6 +82,13 @@ class UserModel {
return "User updated successfully";
}
public function editProfile($userId, $name, $username, $email) {
global $db;
$stmt = $db->prepare("UPDATE users SET user_name = ?, username = ?, user_email = ? WHERE user_id = ?");
return $stmt->execute([$name, $username, $email, $userId]);
}
public function deleteUser($userId) {
global $db;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment