html - Undefined index: image in C:\wamp\www\netupdate.php on line 21 -
i facing weird problem. here file upload snipped of form through trying upload image server
<input type="file" name="image" id="image"> and getting error:
undefined index: image in c:\wamp\www\netupdate.php on line 21 my upload script following
// file upload scrpt $name= $_files['image']['name']; $tmp_name = $_files['image']['tmp_name']; $type = $_files['image']['type']; $size = $_files['image']['size']; $pathandname = "file:///c:/wamp/www/upload/networking/".$name; $moveresult = move_uploaded_file($tmp_name, $pathandname); now weird portion other parameters being accepted in php script other image, writing database , giving success message portion giving errors , weirder part similar script working in other mysql table guess there nothing wrong in php_ini.
you missing enctype="multipart/form-data" on <form> element.
<form action="netupdate.php" method="post" enctype="multipart/form-data">
Comments
Post a Comment