Undefined index: image in E:\\xxx

hi,
new here.
i get an error: Undefined index: image in E:\xxx…
the code seems pretty straight forward to me. Please help me.

<form action=“index.php” method=“POST” enctype=“multipart/form-data”>
File:
<input type=“file” name=“image”> <input type=“submit” value=“Upload”>
</form>

&lt;?php
     mysql_connect("localhost","root","") or die(mysql_error());
     mysql_select_db("databaseimage") or die(mysql_error());
         $file= $_FILES['image']['tmp_name'];
    ?&gt;

change

$file= $_FILES['image']['tmp_name'];

to


if (isset($_FILES['image']['tmp_name'])) {
  $file= $_FILES['image']['tmp_name'];
}

[fphp]isset[/fphp]

:slight_smile: