Forums / Developer / Can EZ post the form data in different modules?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Can EZ post the form data in different modules?

Author Message

zfirst zlast

Saturday 03 January 2009 11:16:20 pm

Hi all, there is a donate page in my site, and i want followings:

1. When client filling up the form, in the custom module, save the client's information into my own table in DB( or make ez send me an email )
2. Then re-post the form to another module( in this custom module, i may need to do some more processing for the data ), then fetch a total tpl.

I have created a custom module, and have finished item one, it save information successfully, but when i want to re-post the data to another module, i got stuck. i knew a method to pass parameters in modules, and tried to use

$Module->redirectionURIForModule($module, $viewName, $parameters = array(), $unorderedParameters = null, $userParameters = false, $anchor = false);

But, it seems that all the userParameters will listed in the url.

I think i just want to know after processing data post from a page in a custom module, how to post the data to another custom module, just "POST" not send data. Could anyone help me? Any suggestions are also welcome, thank you.

Heath

Saturday 03 January 2009 11:49:43 pm

You may need to write a custom php module to re-post the forum submitted to it to another module. You might want to look at the following function, <i>http://www.php.net/manual/en/class.httprequest.php</i>

Cheers,
Heath

7x | https://se7enx.com/
Brookins Consulting | https://brookinsconsulting.com/
Certified | http://web.archive.org/web/201012...th.ez.no/certification/verify/380350
Solutions | https://projects.exponential.earth/users/community/brookins-consulting
eZpedia community documentation project | http://ezpedia.se7enx.com

kracker

Sunday 04 January 2009 12:07:44 am

<smirk /> Some of us could use to learn from this exploit's use of the httpRequest object to submit a form from an Exponential module view. Enjoy ....

From: <i>http://www.astalavista.com/index.php?section=exploits&cmd=details&id=7599</i>

$post_fields = array(
				'ContentObjectAttribute_data_user_login_30' => $ARG[u],
				'ContentObjectAttribute_data_user_password_30' => $ARG[p],
				'ContentObjectAttribute_data_user_password_confirm_30' => $ARG[p],
				'ContentObjectAttribute_data_user_email_30' => $ARG[e],
				'UserID' => '14',
				'PublishButton' => '1'
			);
			
		$headers = array(
		    'User-Agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
		    'Referer' => $ARG[s]
		);

		$res_http = new HttpRequest($ARG[s]."/user/register", HttpRequest::METH_POST);
		$res_http->addPostFields($post_fields);
		$res_http->addHeaders($headers);

		$response = $res_http->send()->getBody();

Cheers, <i>//kracker

Sole & The Skyrider Band,
http://www.youtube.com/watch?v=Yoyp7NhiG70</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

zfirst zlast

Sunday 04 January 2009 2:20:37 am

Hi Heath and kracker, thank you for the helps, i have got it : )

Heath

Sunday 04 January 2009 4:43:05 am

Congratulations!

Cheers,
Heath

7x | https://se7enx.com/
Brookins Consulting | https://brookinsconsulting.com/
Certified | http://web.archive.org/web/201012...th.ez.no/certification/verify/380350
Solutions | https://projects.exponential.earth/users/community/brookins-consulting
eZpedia community documentation project | http://ezpedia.se7enx.com