upload files to the server
<p>I worked currently on being able to upload files to the web site and it should just hand it over in a folder.</p>

<p>It is such that I have trouble uploading the file and there are no files or other things.</p>

<p>I need to work on later of saving file info into the database with which something that has come into the server etc.</p>

<p>What should be loaded into the server, is mostly pdf and mp3 and zip files and Word (doc files)</p>

<p>I try to do like this</p>

<pre><code>&lt;form action="#" enctype="multipart/form-data" method="post"&gt;
            &lt;table width="100%"&gt;
                &lt;tr&gt;
                    &lt;td&gt;Upload&lt;/td&gt;
                    &lt;td&gt;&lt;input type="file" name="file" class="new"&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;Materialer&lt;/td&gt;
                    &lt;td&gt;
                        &lt;select name="materialer" class="new"&gt;
                            &lt;?php
                            $materialer = $mebe-&gt;materialer();
                            ?&gt;
                        &lt;/select&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;File type&lt;/td&gt;
                    &lt;td&gt;
                        &lt;select name="materialer" class="new"&gt;
                            &lt;?php
                                $file_type = $mebe-&gt;file_type();
                            ?&gt;
                        &lt;/select&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;input type="submit" name="upload_telefon" value="Upload" class="new"&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/form&gt;
        &lt;?php
        if(isset($_POST["upload_telefon"]))
        {
            $upload_file_typer_indhold = $mebe-&gt;upload_file_typer_indhold();
        }
        ?&gt;


function upload_file_typer_indhold()
    {

        if($_FILES["file"]["error"] &gt; 0)
        {

            echo "" . $_FILES["file"]["error"] . "";

        }
        else
        {

            move_uploaded_file($_FILES["fil1"]["tmp_name"], "upload/undervisning/");

        }
    }
</code></pre>

<p>When I tried to upload, it says this:</p>

<p><strong>This site is not accessible</strong> and it is standing there on the side also.</p>
