Forums / General Questions / is it possible to send POST data via zen_redirect?

is it possible to send POST data via zen_redirect?

Started by crazysarah on 11 Aug 2012, 10:04 AM · Views: 597

Results 1 to 2 of 2
11 Aug 2012, 10:04 AM
#1
crazysarah avatar

crazysarah

New Zenner

Join Date:
May 2012
Posts:
45
Plugin Contributions:
0

is it possible to send POST data via zen_redirect?

I'm not a hugely experienced php coder but I'm trying to throw together a little mod which integrates with zencart.

I have a form which, after it gets submitted, checks that the image file which has been uploaded in the form isn't less that 500px wide. If it is I use the zen_redirect function to send the user back to the form page again. One of the form fields, however, is a text field which obviously could contain a lot of characters and it doesn't seem like a sensible idea to stick them in the zen_redirect as parameters.

I'm probably over looking something simple which makes this dead easy but I'm stuck.

Can anyone help?

thanks :)

11 Aug 2012, 4:01 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: is it possible to send POST data via zen_redirect?

No, you can't pass POST data via a redirect.
However, you could possibly set up some session variables which will be remembered after the redirect and then use their contents to redisplay the inputs. BUT REMEMBER TO SANITIZE ALL OF THAT INFO BEFORE RE-DISPLAYING, else you'll be opening yourself up to XSS/CSRF attacks.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.