开发者

how to create GET form in Cakephp

So what i want is . to have a form that when i click submit, it gives me output like

http://www.mywebsite.com/testing?text='testing'&number=1234564

not the usual

http://www.mywebsite.com/testing/key:value

it's for Kannel , and it only works with GET forms.

Update

Now Kannel works in GET post as i mentioned. but as Tyler said. it should work behind the scene so that no one 开发者_JS百科just use the SMS feature and send whatever they want.

here is how it works, assuming the username is tester and password is foobar ( it's in the smskannel.conf file ) , these two lines send the sms when kannel is configured and running in the background ( Locally )

$url = "http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=0127715667&text='This is the Message'";
$urloutput=file_get_contents($url);


Are you sure you want to allow any form on your site directly pass through Kannel?

I would suggest submitting the form to your application as a POST, constructing the URL in the action, and then doing whatever it is you want to do with Kannel. (I'm not very familiar with Kannel)


Did you try this?

echo $form->create('Model',  array('type' => 'get'));

To go to another website:

echo $form->create(Null, array('type' => 'get', 'url' => 'http://www.google.com/search'));

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜