Jump to content

File Upload giving me trouble


cooldude832

Recommended Posts

I have a file upload this is the form inputs:

<form name='ad' action='ad_preview1.php' id=\"adimg\" method='post' enctype='multipart/form-data'>
<input type="file" name="imagefile0" id="imagefile0" /><br/>
<input type="file" name="imagefile0" id="imagefile1" /><br/>
<input type="file" name="imagefile0" id="imagefile2" /><br/>
<input type="file" name="imagefile0" id="imagefile3" /><br/>

and this code is not functioning right:

if ($HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/jpg"
	 || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/pjpeg" || $HTTP_POST_FILES['imagefile'.$i]['type'] == "image/pjpg")
	{//Do something}

 

Link to comment
https://forums.phpfreaks.com/topic/54898-file-upload-giving-me-trouble/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.