-1

So here is the code. I get error such as "Undefined index: fad in C:\wamp\www*imdone.php* on line ..." But the link is - http://localhost/exercises.php?page=htmlex&get=imdone#container. Hope i could explain barely

    $folder = 'test/';
$uploadingfile = $folder . basename($_FILES['fad']['name']);

  if (move_uploaded_file($_FILES['fad']['tmp_name'], $uploadingfile))
    {
          echo "Upload successfully.<br>";

      } else {
                echo "Upload unsuccesfully\n";
                }
doğukan
  • 23,073
  • 13
  • 57
  • 69

1 Answers1

-1

The 'fad' in the $_FILES['fad']['name'] is suppose to be the name of your input type=file field in the form. You should first double check with your form to confirm the name.

ooi18
  • 130
  • 2
  • 5