ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PHP in templates, processing $_POST data

November 13, 2014 4:25pm

Subscribe [2]
  • #1 / Nov 13, 2014 4:25pm

    Matthew81

    81 posts

    I need to process form data in a template. I have enabled PHP for the template and am using require() to pull in the processing script (which works flawlessly outside of EE). The form resides outside of EE; the action attribute points to the template.

    When I submit the form, I get the following error:

    This form has expired. Please refresh and try again.

    I disabled CSRF protection and the error persisted.

    Any ideas how to get this to work?

  • #2 / Nov 14, 2014 6:30am

    Giraffentoast

    152 posts

  • #3 / Nov 14, 2014 11:15am

    Matthew81

    81 posts

    Let me Google that for you:

    http://stackoverflow.com/questions/22488918/expression-engine-this-form-has-expired-please-refresh-and-try-again

    Thanks, but I Googled it myself, saw the same page, and can’t use the solution since I’m not willing to globally disable secure forms, and, as I said, the form is outside EE so I can’t include the XID tag. I haven’t found another proposed solution, so I came here hoping someone could recommend something. Just because Google can’t find an answer doesn’t mean there isn’t one; isn’t that what these forums are about?

  • #4 / Nov 14, 2014 11:44am

    Giraffentoast

    152 posts

    Sorry, that sounded way harsher than it should have. 😊
    You probably should have included all that info in your first post.

    I’ve never come across what you describe here. Why would you include a form remotely anyway…? Via iframe…? And the processing as well? Funky. Maybe there’s a cleaner way of doing this?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases