how to pass data cakephp from

Solutions on MaxInterview for how to pass data cakephp from by the best coders in the world

showing results for - "how to pass data cakephp from"
Anna
23 Jul 2018
1// output, if you wanna get output same below array, you need to use name="Member[verify_code]" 
2// name="Member[email]"  in form
3
4Array(
5    [Member] => Array   (
6      [verify_code] => 123466
7      [email] => huuvi168@gmail.com
8      [lang] => zho
9      [password] => 123
10      [confirm_password] => 123
11) )
12  
13  // cake php form
14  <?=$this->Form->create('Member', array('role' => 'form')); ?>
15  <fieldset>
16  <?=$this->Form->input('lang', array('type' => 'hidden', 'value' => $lang, 'required'));?>
17
18  <div class="form-group">
19  <input type="hidden" name="Member[verify_code]" value="<?= isset($verify_code) && !empty($verify_code) ? $verify_code : ''; ?>" />
20  </div>
21
22  <div class="form-group">
23  <input type="hidden" name="Member[email]" value="<?= isset($email) && !empty($email) ? $email : ''; ?>" />
24  </div>
25
26  <div class="form-group">
27  <?=$this->Form->input('password', array('class' => 'form-control', 'placeholder' => __d('frontend', 'new_password'), 'label' => '', 'required')); ?>
28  </div>
29  </fieldset>
30  <?=$this->Form->end(); ?>