please me php upload problem:
my code:
<?php if(isset($_post['uploadsubmit'])) { for($i=0; $i<count($_files['upload']['name']); $i++) { //get temp file path $tmpfilepath = $_files['upload']['tmp_name'][$i]; //make sure have filepath if ($tmpfilepath != ""){ //setup our new file path $newfilepath = "./images/" . $_files['upload']['name'][$i]; //upload file temp dir if(move_uploaded_file($tmpfilepath, $newfilepath)) { //handle other code here } } } } ?> <form action="#" method="post" name="uploadimg"> <input type="file" name="upload[]" /><br /> <input type="file" name="upload[]" /><br /><br /> <input type="submit" name="uploadsubmit" value="submit"> </form> and problem is:
notice: undefined index: upload in c:\web\php_structure\type\article.php on line 71
line 71:
for($i=0; $i<count($_files['upload']['name']); $i++) { and upload not executed. upload in php.ini on
thanks...
Comments
Post a Comment