• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dual Form Submission

Full form processing w/validation (1.6, haven't upgraded yet). Checks email addresses to ensure their valid and additionally against a list of our own checks in place to see if they're a competitor or personal email address. All runs back through our own processing model. Kicks off an email and into a database. It's wonderful.

The company is now using a 3rd party to expedite the processing of all forms submitted through the site. So essentially, what they want me to do is set the action on the form to go directly to their server. But, if I do that, I can't run any server-side validation on it, or process the message the way I want to, before kicking it into their system.

Can I still run all of the CI validation, etc. and then have the form submit to their site without using the 'action' method? I'd like to think there's a way to still send all the info to their site, attaching the post variables, through my model. Similar to the way I send it all into the database. Thoughts?


I think this might be what your looking for.

@pgsjoe: the key to your question is knowing how the 3rd-party server expects you to send the data to them - that is, how are they going to be processing the data. Do they have a cgi script that runs on the local server where the site is, that expects info to the be directly piped to it? Did they setup a PHP script that expects POST/GET data? Do they have a 'formmail'-type script, that can process incoming email messages?

The approach that will be best for you may depend on what tools they enable you to work with!

Oh crap. I didn't even think about that. I just know that right now, if I submit the form to them through the form's action="", everything works exactly like it's suppose to. I was hoping it was as a simple as just putting in their URL as an action within a controller and sending all of my POST variables to it, but it's not looking that way.

SIDE NOTE: 1.7.0 upgrade performed in case there are any new tools for this kind of thing.

Could you do your own validation and if it all passes, then cURL the $_POST to the 3rd party


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.