Html file :
<form action="cregister.php" method="post" enctype="multipart/form-data" class="form-horizontal" id="wizForm">
<input type="file" name="image" id="image" value="uploads/default.png" />
<button type="button" id="simple-post" class="btn btn-success submitBtn">Submit</button>
</form>
action file :
$filename = $_FILES['image']['name'];
$path = "uploads";
move_uploaded_file($_FILES['image']['tmp_name'], $path."/".$filename);
$photo = $path."/".$filename;
$insert = "INSERT INTO user (photo)VALUES ('$photo')";
$sth = $db->query($insert);
Getting error
Notice: Undefined index: image