私はcodeigniter 3.1を使用しています。別の機能から投稿された価値を取得するには?
別の機能からデータを送信した後に投稿したメールを返却または取得する方法は?
HTML
<form action="settings/valid" class="form-horizontal" enctype="multipart/form-data" method="post" accept-charset="utf-8">
<input type="email" name="email" value="<?php echo $email ?>" />
<input type="submit"/>
</form>
PHPルーティングと呼ばれる何がやっている
public function index() {
// how to get post email ?
$email = $this->input->post("email"));
$this->template->loadContent("settings/index.php", array(
"email" => $email
)
);
}
public function valid() {
$email = $this->input->post("email"));
$this->user->add($this->user->ID, array(
"email" => $email
));
redirect(site_url("index.php"));
}
まず、基本を学ぶ必要があります。チュートリアルを実行すると、このすべてがはるかに明確になります - http://www.codeigniter.com/user_guide/tutorial/index.html – cartalot