How to save image in MYSQL database without post method?
<p>I want to save gif type image in mySQL database without post method.   </p>

<pre><code>&lt;form action="add_file.php" method="post" enctype="multipart/form-data"&gt;
        &lt;input type="file" name="uploaded_file"&gt;&lt;br&gt;
        &lt;input type="submit" value="Upload file"&gt;
&lt;/form&gt;
</code></pre>

<p>I want to upload file by php code only. for example:</p>

<pre><code>// Gather all required data
        $name = $File_Name;
        $mime = $File_Type;
        $data = $File_Data;
        $size = $File_Size;

        // Create the SQL query
        $query = "
            INSERT INTO `file` (
                `name`, `mime`, `size`, `data`, `created`
            )
            VALUES (
                '{$name}', '{$mime}', {$size}, '{$data}', NOW()
            )";
</code></pre>

<p>I have more then 21,0000 image in my local. I want to save image in loop. </p>
