I tried a lot suggestions at other people's threats about the same problem, but they didn't work. Can anyone see what I'm doing wrong?
Part of my form:
<form id="register-Form" name="register-Form" method="post" enctype="multipart/form-data" action="exec.php">
<div class="register-line">
<div class="ricon"><i class="fa fa-male"></i> </div>
picture
<input id="file" type="file" name="file" class="register-text"> </input>
</div>
exec.php code
$target_path = "/images/";
$target_path = $target_path . basename( $_FILES['file']['name']);
if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
//succes
} else{
//nothing
}
try this
try with this code