i'm trying to use a get statement in a variable to add data to a data base, when i try to do this nothing is added under folder however if i add plain text it is added. (i'm trying to add to the folder section)
My entire html document is provided below:

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="newfile.css">
    <title>Folder</title>
</head>

<body>
<?php
    include_once 'dbh.php';
echo $_GET["data"];
   if(isset($_GET["data"])) {
    $location = $_GET["data"];
    $sql = "SELECT * FROM posts WHERE folder LIKE '%$location%'";
    $result = mysqli_query($conn, $sql);
    $queryResult = mysqli_num_rows($result);

    if($queryResult > 0) {
        while ($row = mysqli_fetch_assoc($result))
        {
            echo $row['content'];
        }
    } else {
            echo "There are no results matching your search!";
    }
    }
?>
<?php

$uploadpath = 'postimages/';      // directory to store the uploaded files
$max_size = 3116718;          // maximum file size, in KiloBytes
$alwidth = 100000;            // maximum allowed width, in pixeli
$alheight = 100000;           // maximum allowed height, in pixeli
$allowtype = array('bmp', 'gif', 'jpeg', 'jpg', 'jpe', 'png', 'docx', 'psd', 'pdf', 'pptx', 'html', 'php', 'css', 'js', 'mp4', 'mp3');        // allowed extensions

if(isset($_FILES['fileup'])) {
  $uploadpath = $uploadpath . basename( $_FILES['fileup']['name']);
  $name = basename( $_FILES['fileup']['name']);
  $type = end(explode('.', strtolower($_FILES['fileup']['name'])));
  list($width, $height) = getimagesize($_FILES['fileup']['tmp_name']);     // gets image width and height
  $err = '';

  // Checks if the file has allowed type, size, width and height (for images)
  if(!in_array($type, $allowtype)) $err .= 'The file <b>'. $_FILES['fileup']['name']. '</b> not has the allowed extension type.';
  if($_FILES['fileup']['size'] > $max_size*900000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB';
  if(isset($width) && isset($height) && ($width >= $alwidth || $height >= $alheight)) $err .= '<br/>The maximum Width x Height must be: '. $alwidth. ' x 
  '. $alheight;

  // If no errors, upload the image, else, output the errors
  if($err == '') {
    if(move_uploaded_file($_FILES['fileup']['tmp_name'], $uploadpath)) { 
        $content =  $name;
        $realfiledest = $uploadpath;
        $username = 'user';
        $folder = $_GET['data'];
        $sql = "INSERT INTO posts (content, img, folder, date) VALUES ('$content', '$realfiledest',  '$folder', NOW());";
        $result = mysqli_query($conn, $sql);
        if($result !== false) {
            header("Location: fold.php?data=Math");    

        }else{
            echo "fail";
        }

    }
    else echo '<b>Unable to upload the file.</b>';
  }
  else echo $err;
}

?> 
<div class="upform">
        <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data"> 
            <div class="image-upload">
                <label for="file-input">
                    <img src="add-file.png" />
                </label>
                <input id="file-input" type="file" name="fileup"/>            

            </div>       
            <input class="noshow" type="text" id="wow" placeholder="<?php echo $_GET['data']; ?>" name='name'>          
            <input type="submit" id="submit" name='submit'  value="U P L O A D" /> 
        </form>
</div>
<script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(
    function(){
        $('input:file').change(
            function(){
                if ($(this).val()) {
                    $("#submit").show();
                    // or, as has been pointed out elsewhere:
                    // $('input:submit').removeAttr('disabled'); 
                } 
            }
            )     
    });
    </script>
</body>
</html>
```

url= <http://localhost/smart%20assist/fold.php?data=Math>

Any help would be awesome, Thanks