The Ultrashock Ultra Bundle
  • Home
  • Community
  • Forum
  • Development
  • Server Side
  • Thread
  •  
  • Previous topic
  • Next topic
Sign up to post

Development
 Server Side

  • Secret Author 
    • 223 
    • 0 
    • 4 
    [php] Uploading Files
    Secret

    Last reply Jan 31 2007, 11:47 AM

    by Secret

    Posted: Jan 30 2007, 08:21 PM

    by Secret

     

What exactly does putting enctype=“multipart/form-data” in the form tag do? I know that you must have it to make a file upload form work, but why?

  4 REPLIES
 
Jeff
1  
Jeff

It tells your browser to encode the POST data as multipart/form-data, which is code for ‘there’s a couple parts, and one of them may be something besides a simple text field, so encode it accordingly’.

Without that, you’d get it sent as a URL-encoded list of variable/value pairs (&var=value), which makes transferring a file kinda tough…

  • 30 January 2007 09:15 PM
  •  
Silver_S
2  
Silver_S

enctype=“multipart/form-data” let you upload files with PHP, like JPG files, DOC files, etc…...

  • 31 January 2007 10:21 AM
  •  
tiran
3  
tiran

I can’t tell you how many times I have forgot to put that and banged my head against the wall for 15 - 20 mins before I realized the omission.

  • 31 January 2007 10:42 AM
  •  
Secret Author 
4  
Secret

^ Same here….

  • 31 January 2007 11:47 AM
  •  
  •   Log in or join for free to make a comment.
 
Topic actions
  •  Share on Facebook
  •  Share on Twitter
Topic Categories
  •  Show All Topics
  •  Development
    •  Server Side
    •  Client Side
  •  Creative Software
    •  Web
    •  Video
    •  3D
    •  Illustrator
    •  Photoshop Battles
    •  Photoshop
  •  Design
    •  Typography
    •  Resources & Insight
    •  Checkpoint
  •  Career
    •  Copyright Matters
    •  Advice & issues
    •  Job Seekers
    •  Job Offers
  •  Flash
    •  UltraMath
    •  OOP
    •  Third Party Tools
    •  Open Source alternatives
    •  Data Communication
    •  Components
    •  Flex
    •  AIR
    •  Flash Lite
    •  Flash Professional
    •  Flash Newbie
    •  ActionScript
    •  XML
  •  Lounge
    •  Polls
    •  Random Chat
    •  Showcase And Critique
    •  BombShock Award Nominations
  •  Community Essentials
    •  BombShock Award Winners
    •  Tutorials
    •  Interviews
    •  News
    •  Bitmap tutorials
Popular Topics
  • Sort by: 
  • Activity
  • Views
  • Comments
  • Likes
Advertise with us
  • Your advertisement here!
  • loading
Ultrashock
  • Creative Assets
  • Community
  • Blog
  1. Home
  2. Forum
+/-
Creative Assets
  • Categories
  • Contributors
  • How to buy
Make Money
  • Commission Rates
  • Referral Program
  • Contributor Program
Community
  • Activity Feed
  • Forum
  • Profiles
About
  • Quick Tour
  • Our History
  • Banners & Logos
Support
  • Contact Ultrashock
  • Advertise with us
  • Legal Information
  •  Keep up to date
  • Flash 779  Flash
  • Audio 6,481  Audio
  • Vector 2,130  Vectors
  • Image 12,338  Images
  • Creative Assets 21,728  Assets
  • Profiles 282,751  Members
  • Topics 93,776  Topics
  • Blog 4  Blog
  • Facebook 1,679  Facebook
  • Twitter 1,163  Twitter
  • Join our FREE monthly newsletter!
  • Archive
  • Invalid email address. Please try again.
Subscribe
  • ©2012 Ultrashock LLC - All rights reserved
  • Terms of Use
  • Privacy Policy
  • Switch to dark theme
  • RSS Feeds
  • Top

©2012 Ultrashock LLC - All rights reserved

Printed on Sat, February 11, 2012 - 20:07:02