1
사용자가 페이지에 등록 할 때 사용자가 제출을 클릭하면 '등록 해 주셔서 감사합니다. 이메일을 확인하십시오.'라는 메시지가 나타나기를 바랍니다. 즉cakephp, 사용자가 등록했습니다 - 어떻게 응답 페이지를 만드시겠습니까?
if ($this->User->save($this->request->data)) {
$this->Session->setFlash('The user has been saved');
$this->render('thank_you');
}
, 또 다른를 만들 : 여기
는 현재 부가 기능에 대한 내 코드입니다 여기function add(){
$this->set('title_for_layout', 'Please Login');
$this->set('stylesheet_used', 'style');
$this->set('image_used', 'eBOXLogo.jpg');
if($this->request->is('post')){
$this->User->create();
if ($this->User->save($this->request->data))
{
$this->Session->setFlash('The user has been saved');
}
else { $this->Session->setFlash('The user could not be saved. Please, try again.'); }
}
}
내 추가보기
<h2>Please enter your details</h2>
<?php
echo $this->Form->create('User', array('action'=>'add'));
echo $this->Form->input('username',array('label'=>'Username: '));
echo $this->Form->input('password',array('label'=>'Password: '));
echo $this->Form->input('password_confirmation',array('type'=>'password'));
echo $this->Form->input('email',array('label'=>'Email: '));
echo $this->Form->input('title',array('label'=>'Title: '));
echo $this->Form->input('firstname',array('label'=>'First Name: '));
echo $this->Form->input('surname',array('label'=>'Surname: '));
echo $this->Form->input('street',array('label'=>'Street Address: '));
echo $this->Form->input('city',array('label'=>'City: '));
echo $this->Form->input('state',array('label'=>'State: '));
echo $this->Form->input('country',array('label'=>'Country: '));
echo $this->Form->end('Click here to Register ');
?>
축하합니다. 빠른 답변을 보내 주셔서 감사합니다. – user1393064