Forums / Developer / Get data submitted via a form to an external php script

Get data submitted via a form to an external php script

Author Message

Kenneth Colwell

Monday 23 February 2004 1:04:43 pm

I've looked at this:

http://ez.no/community/forum/developer/http_post_get_hack_instead_of_ezenv

and it doesn't work. Is this hack not compatable with 3.2?

I've also looked at ezenv and it will not work because I need arrays from the form.

Does anyone have any hints? help? or fenceposts that I can bang my head into over and over until the pain of upgrading from 2.2.9 to 3 goes away?

Thanks,
Ken Colwell

Balazs Halasy

Tuesday 24 February 2004 12:22:57 am

Hi,

If you wish to write a simple external PHP script that should handle the data which was input using a form, I think you should do the following:

Look at the form module. This is a _very_ simple module. Anybody with some basic PHP skills should understand it. It is located under "/kernel/form". There are two files: module.php and process.php. The module file simply tells eZ publish about the view(s)/function(s) that are available in this module. As you can see, there is only 1 function/view, which is the "process" thing. This is a simple view/function that uses form-input data to send an email. Simply copy the entire thing and create your custom module out of it (as an extension of course). Replace the PHP code with your own PHP code (reuse the existing code to figure out how to get the contents of the forms, etc.).

Good luck.

Balazs

javier sanchez

Wednesday 25 February 2004 2:43:32 pm

well im having the same problem, i got 2 information collect pages (2nd continues from the first) and i want to display data on a 3 one and save it to a database , so i got to pass info from page 1 to page 2 as an array (more than 15 values) and from page 2 to page 3... but in page 3 i want to show data from both pages, i tried tweaking with "HTTP POST & GET Hack (instead of ezenv)" and tried "EzEnv" itself, im very frustrated, im using ezpublish instead of programming in php at raw, but i cant get the info to pass from one template to another, or even create a global repository for my info (like a cookie, or whatever)

thanks javier sanchez-galan