Fix: Profile picture upload issues and improved error handling
- account_settings.php: Show success message before reloading page (with 1.5s delay) - upload_profile_picture.php: Reorder require statements for proper initialization, add file error code to error message
This commit is contained in:
@@ -175,11 +175,11 @@ $user = $result->fetch_assoc();
|
||||
}
|
||||
|
||||
if (response.status === 'success') {
|
||||
// Update the profile picture source with cache-busting query string
|
||||
// Reload the current page
|
||||
window.location.reload();
|
||||
|
||||
$('#responseMessage').html('<div class="alert alert-success">' + response.message + '</div>');
|
||||
// Reload the current page after a short delay
|
||||
setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 1500);
|
||||
} else {
|
||||
$('#responseMessage').html('<div class="alert alert-danger">' + response.message + '</div>');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user