Parse error: syntax error, unexpected below code

I'm getting an error!

Parse error: syntax error, unexpected '{' in C:\wamp64\www\playground\back.php on line 54

Please guide me if there is any resource where I can learn how to indent properly!

<!doctype html>
<html>
<head>
<title>Back</title>
</head>
<body>
<b>Logic</b>
</br>
<a href="front.php">Go to Frontend.</a>
<hr>
<div><form method="post" enctype="multipart/form-data">
<input type="file" name="image"/>
<br/><br/>
<input type="submit" name="submit" value="upload">
</form>
</div>


<?php
$con = mysqli_connect("localhost","root","","db_test");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// Logic
if(isset($_POST['submit']))
{
if(getimagesize($_FILES['image']['tmp_name'])== FALSE)
{
echo "Please select an image";
}
else {
$image= addslashes($_FILES['image']['tmp_name']);
$name= addslashes($_FILES['image']['tmp_name']);
$image= file_get_contents($image);
$image= base64_encode ($image);
saveimage($name,$image);}}

displayimage();
function saveimage($name,$image)
{
$con=mysqli_connect("localhost","root","");
mysqli_select_db($con,"db_test");
$qry="insert into db_test_table (name,image) value ('$name','$image')";
$result=mysqli_query($con,$qry);}

function displayimage(){

$con=mysqli_connect("localhost","root","");
mysqli_select_db($con,"db_test");
$qry="select * from images";
$result=mysqli_query($con,$qry);}
white($row= mysqli_fetch_array(result))
{

echo '<img height="300" width="300" src="data:image;base64,'.$row[2]'"> ';

}
mysqli_close($con);
}


?>

</body>
</html>

I'm new to development and no idea why I'm getting this error, I was trying to copy mysql code and to convert it to mysqli but no luck.

Thanks for help. This is my first stackoverflow post :)