Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,820 members, 7,956,087 topics. Date: Monday, 23 September 2024 at 01:25 AM |
Nairaland Forum / Science/Technology / Programming / Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? (1377 Views)
Please Help Me Write This Simple Php Switch Statement / Simple Php Challenge / Simple PHP Quiz: Kill The Rand() (2) (3) (4)
Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Nobody: 3:56pm On Jul 30, 2011 |
if(($_SERVER['CONTENT_TYPE']=="application/x-www-form-urlencoded")&&($_SERVER["REQUEST_METHOD"]=='POST')) {return true;}The above code is a very good way to detect if a form is about to be submitted. Now, it works fine, but if you are uploading files, it fails? why? |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by dellnet: 4:34pm On Jul 30, 2011 |
I thought I am the only one bored here, does considering MIME type count? |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Nobody: 4:40pm On Jul 30, 2011 |
Caramba! But of course you are corecta. |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Zahymaka(m): 6:10pm On Jul 31, 2011 |
Because uploads are sent using multipart/form-data (sp?) |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by dhtmlextreme(m): 6:47pm On Jul 31, 2011 |
Of course. . |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Nobody: 12:04pm On Aug 01, 2011 |
@Zahymaka that only works for PHP to see the Uploaded Contents,the method type should be $_FILES because that is the Super Globals that references all (Input Files). |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Nobody: 12:48pm On Aug 01, 2011 |
pc guru: @pc guru, do you develop android app? I need a developer. Reply, text or call 07033039109. |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Nobody: 1:07pm On Aug 01, 2011 |
Sorry unfortunately i don't but check the Google nigeria group there are android developers there. |
Re: Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? by Nobody: 1:16pm On Aug 01, 2011 |
Thanks, pls can u send a link. |
(1) (Reply)
Professional Webdev Help-center / Layer 7 DDOS – Blocking HTTP Flood Attacks / Check These Two Interesting Android Apps I Developed From Scratch
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |