i am trying to store image in a folder and getting a error. it say undfine variable my clearly the variable is difined in html code(input type = file)
Notice: Undefined index: image_file in C:\xampp\htdocs\E_COMMERCE\additem.php on line 82
line 82: move_uploaded_file($_FILES['image_file']['tmp_name'], "IMAGE/ITEMS/$image_name");
<input type ="file" name="image_file" id="image_file" class='file'/>
//place image in the folder
$pid = mysql_insert_id();
$image_name = "$pid.jpg";
move_uploaded_file($_FILES['image_file']['tmp_name'], "IMAGE/ITEMS/$image_name"); //place image in folder
-=============================================================================================-----------===========================================================================================
i had a simplier problem before. it was giving me same error. but only on: undefined index: remember
$remember_p = $_POST['remember'];
<input type="checkbox" name="remember" id="login_remember" class="checkbox" value="yes" />
this problem was fixed by putting $remember_p = isset($_POST['remember']);
so i was thinking i can throw isset functont around my problmen
isset(move_uploaded_file($_FILES['image_file']['tmp_name'], "IMAGE/ITEMS/$image_name"));
but than this get get me error to.