开发者

How to post a form at external url in cake php.?

I am going to implement paypal in cake php. 开发者_开发问答I have two conditions to post the form.

  1. Fist posts the form to paypal, if user click on paypal button. Then form shoud be posted at paypal url at : https://www.paypal.com/cgi-bin/webscr .

  2. If user click on submit button form should be posted to it controller.

It means i want to create two forms at a single page and want to posts at different places in certain conditions.

If I am giving custom action in form, it is adding app name+controller name before the url. like: appname/controllername/http://google.com. but want only http://google.com .I want to remove appname/controllername from the url.

How do I do this? Thanks in advance.


In your form creation call, you need to specify the URL

echo $this->Form->create('Model', array('url' => 'http://google.com'));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜