i have file input in php
<form action="" method="post" enctype="multipart/form-data"> <input type="file" name="fileup"> </form>
the error "undefine index". here code php.
<?php $file = strtolower($_files["uploadpic"]["name"]); ?>
the undefined index uploadpic.
your element named fileup
, you're using ["uploadpic"]
- both of must match.
either $file = strtolower($_files["fileup"]["name"]);
or rename element to:
<input type="file" name="uploadpic">
- the choice yours.
reference links: