HighDots Forums  

Fix to MySQL and Pure PHP Upload behavior

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Fix to MySQL and Pure PHP Upload behavior in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Leesa
 
Posts: n/a

Default Fix to MySQL and Pure PHP Upload behavior - 08-05-2004 , 03:17 PM






Last week I was trying to find the answer to the Pure PHP UPload and Smart
Image Processor extensions working but the image name not being uploaded to the
MySQL DB using PHP 4.7.3. All other field uploaded.

Someone finally found an answer so I thought I would post it here incase
others were using this combo:

On the page that includes the upload form you need to change all the
$_POST['xxx'] s to $HTTP_POST_VARS['xxx'] That did the trick. Only needed to
change the code on the db upload pages, not the whole site.



Reply With Quote
  #2  
Old   
Justin Kozuch
 
Posts: n/a

Default Re: Fix to MySQL and Pure PHP Upload behavior - 08-05-2004 , 03:32 PM






Good to know. Thanks for posting that Leesa.

--
Cheers,

Justin Kozuch
Founder, Dreaming in TO
Netkeepers.ca - Proud Hosting Sponsor of DreaminginTO.com Dreamweaver MX
2004 Certified Developer - http://www.macromedia.com/go/certification
Team Macromedia Volunteer for Dreamweaver MX 2004 -
http://www.macromedia.com/go/teammacromedia
CommunityMX Partner - http://www.communitymx.com

Leesa wrote:

Quote:
Last week I was trying to find the answer to the Pure PHP UPload and Smart
Image Processor extensions working but the image name not being uploaded to the
MySQL DB using PHP 4.7.3. All other field uploaded.

Someone finally found an answer so I thought I would post it here incase
others were using this combo:

On the page that includes the upload form you need to change all the
$_POST['xxx'] s to $HTTP_POST_VARS['xxx'] That did the trick. Only needed to
change the code on the db upload pages, not the whole site.

Reply With Quote
  #3  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Fix to MySQL and Pure PHP Upload behavior - 08-05-2004 , 10:01 PM



.oO(Leesa)

Quote:
Last week I was trying to find the answer to the Pure PHP UPload and Smart
Image Processor extensions working but the image name not being uploaded to the
MySQL DB using PHP 4.7.3. All other field uploaded.

Someone finally found an answer so I thought I would post it here incase
others were using this combo:

On the page that includes the upload form you need to change all the
$_POST['xxx'] s to $HTTP_POST_VARS['xxx'] That did the trick.
Huh? The $HTTP_*_VARS arrays are deprecated and may be disabled in
recent PHP, the superglobals $_POST/$_GET/... are the correct way to go.

Micha


Reply With Quote
  #4  
Old   
Leesa
 
Posts: n/a

Default Re: Fix to MySQL and Pure PHP Upload behavior - 08-05-2004 , 10:21 PM



Yes, good point to make. Must be why the change was needed. I'm still
learning PHP. I'd say the extension code is a bit outdated which prevented it
from working properly with the newer DWMX2004 coding.

Just for other newbies:
Reading in the PHP Bible it says:
"... will cause the creation of a PHP variable called $_POST['email'] (or
$HTTP_POST_VARS['email'] if you use the older style of variable arrays; or just
$email if you have register_globals turned on)"

The $HTTP_POST_VARS['email'] is depreciated but it's still better than turning
register_globals back on. Hopefully they will update the extension in the near
future so you won't have to change DW code like this. Love the extension so
we'll just have to live with it until then. I'm glad someone found a
work-around!

Thanks. Leesa




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.