Update assosiaction data

my srcipt cannot effect :frowning:
public function edit($id = null)
{
$hubungan = [‘profile’];
$user = $this->Users->get($id, [
‘contain’ => $hubungan
]);
if ($this->request->is([‘patch’, ‘post’, ‘put’])) {
$user = $this->Users->patchEntity($user,$this->request->getData(),[‘associated’=>$hubungan]);
if ($this->Users->save($user)) {
$this->Flash->success(__(‘The user has been saved.’));

            return $this->redirect(['action' => 'edit',$id]);
        }
        $this->Flash->error(__('The user could not be saved. Please, try again.'));
    }
    $this->set(compact('user'));
}
<?= $this->Form->create($user) ?>
    <div class="columns large-6 ">

   
    <?php
        echo $this->Form->control('username');
        echo $this->Form->control('password');
        echo $this->Form->control('role');
        echo $this->Form->control('status',['options'=>['1'=>'Aktif','0'=>'Tidak Aktif']]);
    ?>
    </div >
        <div class="columns large-6">
    <?php
        echo $this->Form->control('Profile.nama_user');
        echo $this->Form->control('Profile.jenis_kelamin');
        echo $this->Form->control('Profile.alamat',['type'=>'textarea']);
        ?>
</div>

<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>

help me

A couple of pointers;

  1. When trying to resolve a problem, describe (1) what you were doing (2) what you expected (3) what you got.
  2. As this is a free forum where people help eachother, people will respond to social interaction, with keywords like “Please”.
    If you take care of those, chances are someone will have a look at this issue a lot sooner and help out.
    Looking forward to your update.
1 Like

i understood, thank you sir, and please forgiveme, i had been resolved this problem, just mini mistake from [‘profile’] to [‘Profile’] , sorry, but idont know what different ? just P and p , this my code if people another Need…
bandicam%202018-03-06%2007-08-05-698
bandicam%202018-03-06%2007-08-13-401

When comparing strings, a capital letter is completely different from its lower case counterpart. On a technical level, this is resolved per character by their code. In UTF8 for instance;
Unicode
code point character UTF-8 (hex.) name
U+0050 P 50 LATIN CAPITAL LETTER P
U+0070 p 70 LATIN SMALL LETTER P
Reference: http://www.utf8-chartable.de/

Or in ASCII;
Dec Oct Hex Binair Character
80 120 50 1010000 P
112 160 70 1110000 p
Reference: https://en.wikipedia.org/wiki/ASCII