What is the issue with the PHP script needing manual refresh to update user levels?

The issue with the PHP script needing manual refresh to update user levels is likely due to the script not dynamically updating the user levels in real-time. To solve this issue, you can implement AJAX functionality in the PHP script to automatically update the user levels without the need for manual refresh.

```php
// PHP script with AJAX functionality to update user levels dynamically

// Check if AJAX request is being made
if(isset($_POST['action']) && $_POST['action'] == 'update_user_level'){
  // Code to update user levels here
  
  // Return updated user levels
  echo json_encode($updated_user_levels);
  exit;
}
```

In this code snippet, we check if an AJAX request is being made with a specific action parameter. If the action is to update user levels, we update the user levels and return the updated user levels in JSON format. This allows the PHP script to dynamically update user levels without the need for manual refresh.