Can someone help me out with the download code in PHP with passing variables from links? : hey i crated a page indes.php with the following code :

        <?php
    
    include "db.php";
    
    $select="SELECT *FROM alldocs ";
    
    $query=mysqli_query($conn,$select);
    
    <form action="upload.php" method="POST" enctype="multipart/form-data">
    
        
    
     <input type="text" name="name" placeholder="name"><br><br>
    
     <input type="file" name="file" ><br><br>
    
     <input type="submit" name="submit" value="submit"><br><br>
    
    
    
    </form>
    
    <div class="box-info">
    
        <?php
    
            while($row=mysqli_fetch_assoc($query)){
    
                echo $row['name'].'<br>'.
    
                '<a href="downloud.php?get=$path">downloud file</a>    <br>';}
    
        ?>
    
    </div>
than i crated the upload.php like this

    <?php

    if(isset($_POST['submit'])){



    include "db.php";

$name   =$_POST['name'];

$file   =$_FILES['file'];

$fileName   =$file['name'];

    $fileTmp    =$file['tmp_name'];

    $path='downloud/$fileName';

if(move_uploaded_file($fileTmp , $path)){

    $insert=" INSERT INTO alldocs(name,path) VALUES('$name','$path')";

        $query=mysqli_query($conn,$insert);

        header("Location:index.php");

    }}

?>   

Now i the index.pho  in the link i tryed to hook up at the get=$path so that i can get in the next page wich will make it possible to dowloud the path from the db like this :

    <?php 

    f(isset($_GET['get'])){ 

    

include "db.php";

$path=$_GET['get'];



    $select="SELECT*FROM alldocs WHERE path='$path';" ;

    $query=mysqli_query($conn,$select);



    header('Conetent-type:application/octet-stream');

    header('Conetent-disposition:attachment;filename="'.basename($path).'"' );

    header('Conetent-lenght:.filesize($path)'); 

readfile($path);

}

?> 

so please if someone could point me to the error that i make in this code : beacuse i get allways and error WARNING : readfile($path); as undefined !



thank you in advance 