i have following php/ html code:
<?php if($_server['request_method'] == 'post') { $file_name = "../images/".$_files["file"]["name"];} echo $file_name; ?> <form name="updatearticle" method="post"> <div class="custom_file_upload"> <input type="text" class="file" name="file_info" id="file_info" disabled="disabled" value="<?php echo $image_name;?>"> <div class="file_upload"> <input type="file" id="file_upload" name="file" onchange="name_change()" id="file"> </div> </div> the problem here can't value of $_files["file"]["name"]
why , how can fix it?
your form hasn't specified multipart/form-data file uploads
change form , set proper enctype
<form name="updatearticle" method="post" enctype='multipart/form-data'>
Comments
Post a Comment