私はCake PHP 3で簡単な編集フォームを開発しようとしています。セッションからそれらを移入したいと思います。Cake PHP 3:セッションからの入力をどのように入力できますか?
どうすればいいですか?
edit.ctp:
<br>
<div class="index large-4 medium-5 large-offset-4 medium-offset-4 columns">
<div class="panel">
<h2 class="text-center">Edit</h2>
<?= $this->Form->create(); ?>
<?php $nome = $this->request->session()->read('Auth.User.nome');
echo $this->Form->input('nome', array('id' => 'nome'), array('value' => $nome)); ?>
<?= $this->Form->input('email' ,array('id' =>'email')); ?>
<?= $this->Form->input('password', array('type' => 'password'), array('id' => 'password')); ?>
<?= $this->Form->submit('Alterar', array('class' => 'button')); ?>
<?= $this->Form->end(); ?>
</div>
</div>
実際にあなたの問題は、あなたはAuthの名前を取得していないか、または編集を適用できません。それはあなたの鼻または名前フィールドですか? –
問題は既に解決されています。ありがとう! – VitorTech