0

Why do I get undefined index in this code?

$a=filter_input(INPUT_POST,'submit'); if(isset($a)) { $myFile=$_FILES['M']['name']; $name=$_FILES['M']['tmp_name']; if(isset($myFile)) { if(!empty($myFile)) {echo 'success';} }else{echo 'select a picture; } I used netbeans editor

30th May 2018, 1:30 PM
Adu Fp
Adu Fp - avatar
1 Odpowiedź
+ 1
in the first line use $_POST['submit']
31st May 2018, 9:28 PM
Hemath Kumar
Hemath Kumar - avatar