ログインフォームを作成する必要がありますが、zend_formを使用せずに、フォームフィールドを作成する場所と投稿およびフェッチする方法を説明します。
1 に答える
2
Stackoverflow は、あなたのコードを他の人に作ってもらうために作られているわけではありません。あなたは自分自身を試すことが期待されており、特定の部分で立ち往生している場合は、ここに来て助けを求めることができます. とりあえず始めます
HTML
<form method="post" action="/account/login">
<input type="text" name="email" id="email" value="">
<input type="password" name="password" id="password" value="">
<input type="submit" name="submit" id="submit" value="Submit">
</form>
account
これはコントローラーとアクションを指しますlogin
コントローラ
<?php
class AccountController {
public function loginAction() {
// Get the request
$request = $this->getRequest();
// If the request was a post we process the login request
if ( $request->isPost() ) {
$email = $request->getParam('email');
$password = $request->getParam('password');
// Login procedure
}
}
}
于 2013-02-07T21:28:03.613 に答える