My HTML code
<form method="post" enctype="multipart/form-data" action="upload.php">
<input type="file" name='image' >
<input type="SUBMIT" value="Submit">
</form>
PHP code(Only the line which is errorneous is mentioned)
<?php
list($waste,$extension) = explode("/",$_FILES["image"]["type"]);echo $extension;
?>
It is giving file extension if the file is an image but it’s giving error in case of video.
ERROR
( ! ) Notice: Undefined index: image in D:\wamp\www\upload.php on line 3
Call Stack
# Time Memory Function Location
1 0.0007 364904 {main}( ) ..\upload.php:0
( ! ) Notice: Undefined offset: 1 in D:\wamp\www\upload.php on line 3
Call Stack
# Time Memory Function Location
1 0.0007 364904 {main}( ) ..\upload.php:0
Please tell me how to make it work for video uploading also.
The ini_set function is