URL.createObjectURL
https://learn.javascript.ru/blob<script>
function preview() {
frame.src=URL.createObjectURL(event.target.files[0]);
}
</script>
<form>
<input type="file" onchange="preview()">
<img id="frame" src="" width="100px" height="100px"/>
</form>
Tools -> Deployment -> Automatic upload
<script>
window.history.replaceState({}, null, '/');
</script>
mysqli_query($link,"INSERT INTO users SET name='".$login."', password='".$password."';");
var_dump(mysqli_error($link)); //<---