21285 Posts in 5732 Topics by 2602 members
General questions about getting started with SilverStripe that don't fit in any of the categories above.
|Go to End|
10 May 2011 at 6:56am
I tried straight out using the $_POST variables in a controller, and it seemed to not work. However, using them in a non-controller file, such as its own standalone file in the root of the site dir, worked. Is there a method for working with HTTP POST in sapphire, or is there a work-around for it?
Basically, I have some data being posted to a SS site from another, external site on a different domain, and I want to build a controller that can receive and handle that data.
Thanks in advance for any tips.
10 May 2011 at 8:12am
There is no reason for $_POST access to not work.
In SilverStripe, you access the SS_HTTPRequest object to get request values. In your controller, they're accessed by $this->request->postVar('varName');
10 May 2011 at 12:37pm
Hmm, I wasn't aware of the SS_HTTPRequest object. Thanks for pointing it out, I'll give it a try now.
|Go to Top|