Post & Php/Html & subdomains

software development

#1

i have a little script i am using to upload photos to my website with(i hate using ftp on the road).
the html portion:

upload.php:

Here’s the Php portion on the recieveing page:

upload2.php:

<? if (!isset($HTTP_POST_FILES['userfile'])) echo "no file!"; if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { ... the script works fine under the main domain name, but refuses to work under a subdomain. 'userfile' is returned null to the 2nd page when its run under the subdomain. any idea why?

#2

Change$HTTP_POST_FILESto$_FILES
Simon’s site
For a limited time, save $100 on 1-yr plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)


#3

Thanks! it fixed the subdomain!

Should i change that on the main site as well? or just use it for subdomains?


#4

You should change it everywhere. The old HTTP_*_VARS arrays were deprecated long ago, and aren’t available in the default version of PHP5. See this wiki page for a fuller explanation.

Simon’s site
For a limited time, save $100 on 1-yr plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)