I have this code for send date:
<form enctype="multipart/form-data" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="post">
<input name="file[]" type="file" id="img">
<textarea name="file[]" rows="5" cols="50" id="textarea"></textarea>
<input name="file[]" type="text" id="text" value="">
<input type="submit" value="upload" name="submit" id="upload" class="upload"/>
</form>
and this code:
<?php
if (isset($_POST['submit'])){
$textarea=$_POST['file'];
$implodetextarea=implode(",",$textarea);
for ($i = 0; $i < count($textarea); i++){
echo $textarea['id'][$i];//This is wrong
}
}
?>
Now how to get the type of data and how you can distinguish between the image or text, or others?