<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include("includes/connect.php");
$result = $smeConn->query("SELECT id, password FROM users");
while($row = $result->fetch_assoc()){
    $hash = password_hash($row['password'], PASSWORD_DEFAULT);
    $updateSql = "UPDATE users SET password='$hash' WHERE id=".$row['id'];
    echo "Running: " . $updateSql . "<br>";
    if($smeConn->query($updateSql)){
        echo "Updated id ".$row['id']." successfully<br>";
    } else {
        echo "Failed id ".$row['id'].": ".$smeConn->error."<br>";
    }
}
echo "Done";
?>