Jump to content

FILE Display ERROR


Recommended Posts

Hello everybody, i got form with 2x file upload fields.

<form action='Proceed.php' method='post' enctype='multipart/form-data'>    <label for='imagefile'>Image (.JPG):</label>    <input id='form_addgame' type='file' name='imagefile' id='imagefile' /><input type="hidden" name="MAX_FILE_SIZE_IMG" value="3000000" /> <!-- 3000 KB -->    <label for='flashfile'>Flash (.SWF):</label>    <input id='form_addgame' type='file' name='flashfile' id='flashfile' /><input type="hidden" name="MAX_FILE_SIZE_SWF" value="5000000" /> <!-- 5000 KB --></form>

When i proceed to confirmation page i get this error echo "Image file format: " . $_FILES['imagefile']['type']; //PASTES image/jpegecho "Flash file format: " . $_FILES['flashfile']['type']; //DOESNT PASTE ANYTHING Im not sure howto fix this problem O_o

Link to post
Share on other sites

I'm getting this when check for a post when I submit the form to itself:

Image file format: image/jpegFlash file format: application/x-shockwave-flash
So I think your code is okay. I don't know what the cause of it is, unfortunately. But here's my full code. Maybe it will help:
<?phpif ($_POST) {    	echo "Image file format: " . $_FILES['imagefile']['type']; //PASTES image/jpeg	echo "<br>";	echo "Flash file format: " . $_FILES['flashfile']['type']; //DOESNT PASTE ANYTHING} ?><form action="self.php" method='post' enctype='multipart/form-data'>	<label for='imagefile'>Image (.JPG):</label>	<input id='form_addgame' type='file' name='imagefile' id='imagefile' /><input type="hidden" name="MAX_FILE_SIZE_IMG" value="3000000" /> <!-- 3000 KB -->	<label for='flashfile'>Flash (.SWF):</label>	<input id='form_addgame' type='file' name='flashfile' id='flashfile' /><input type="hidden" name="MAX_FILE_SIZE_SWF" value="5000000" /> <!-- 5000 KB --><input type="submit" /></form>

Edited by Ixzion
  • Like 1
Link to post
Share on other sites
I'm getting this when check for a post when I submit the form to itself: So I think your code is okay. I don't know what the cause of it is, unfortunately. But here's my full code. Maybe it will help:
<?phpif ($_POST) {    	echo "Image file format: " . $_FILES['imagefile']['type']; //PASTES image/jpeg	echo "<br>";	echo "Flash file format: " . $_FILES['flashfile']['type']; //DOESNT PASTE ANYTHING} ?><form action="self.php" method='post' enctype='multipart/form-data'>	<label for='imagefile'>Image (.JPG):</label>	<input id='form_addgame' type='file' name='imagefile' id='imagefile' /><input type="hidden" name="MAX_FILE_SIZE_IMG" value="3000000" /> <!-- 3000 KB -->	<label for='flashfile'>Flash (.SWF):</label>	<input id='form_addgame' type='file' name='flashfile' id='flashfile' /><input type="hidden" name="MAX_FILE_SIZE_SWF" value="5000000" /> <!-- 5000 KB --><input type="submit" /></form>

Thanks for reply, copyed ur form code + removed the double ID what was added 2 times (form_addgame) and somehow now it works :)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...