質問編集履歴

4

質問文を編集しました。

2019/06/03 23:24

投稿

amaturePy
amaturePy

スコア131

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,9 @@
48
48
 
49
49
  {
50
50
 
51
- $this->request->$id('profile');
51
+ $id=$this->request->data('profile');
52
+
53
+ //$this->request->$id('profile');
52
54
 
53
55
  echo $id;
54
56
 

3

エラー内容を追加しました。

2019/06/03 23:24

投稿

amaturePy
amaturePy

スコア131

test CHANGED
File without changes
test CHANGED
@@ -7,6 +7,10 @@
7
7
  また、下記のecho"1","2"はデバックのために記載しました。
8
8
 
9
9
  その結果echo"2"の行が反応していないと分かりました。
10
+
11
+
12
+
13
+ エラー内容「Undefined variable: id」
10
14
 
11
15
 
12
16
 
@@ -44,13 +48,15 @@
44
48
 
45
49
  {
46
50
 
51
+ $this->request->$id('profile');
52
+
47
53
  echo $id;
48
54
 
49
55
  if (!$id)
50
56
 
51
57
  {
52
58
 
53
- echo"1"; //throw new NotFoundException(__('Invalid user'));
59
+ echo "1"; //throw new NotFoundException(__('Invalid user'));
54
60
 
55
61
  }
56
62
 
@@ -94,6 +100,8 @@
94
100
 
95
101
  }
96
102
 
103
+
104
+
97
105
  コード
98
106
 
99
107
  ```

2

質問文を修正しました。

2019/06/03 17:16

投稿

amaturePy
amaturePy

スコア131

test CHANGED
File without changes
test CHANGED
@@ -18,11 +18,11 @@
18
18
 
19
19
  echo $this->Form->create('Users',array('action'=>'profile'));
20
20
 
21
- echo $this->Form->input('username');
21
+ echo $this->Form->hidden('username',['username']);
22
22
 
23
- echo $this->Form->input('password');
23
+ echo $this->Form->hidden('pass',['password']);
24
24
 
25
- echo $this->Form->input('email');
25
+ echo $this->Form->hidden('email',['email']);
26
26
 
27
27
  echo $this->Form->end('Save');
28
28
 

1

質問文を編集

2019/06/03 16:02

投稿

amaturePy
amaturePy

スコア131

test CHANGED
File without changes
test CHANGED
@@ -3,6 +3,10 @@
3
3
  profile関数はユーザー情報の編集機能
4
4
 
5
5
  この$idにPOSTの値を入れたいと考えてます。
6
+
7
+ また、下記のecho"1","2"はデバックのために記載しました。
8
+
9
+ その結果echo"2"の行が反応していないと分かりました。
6
10
 
7
11
 
8
12
 
@@ -46,7 +50,7 @@
46
50
 
47
51
  {
48
52
 
49
- echo "1"; //throw new NotFoundException(__('Invalid user'));
53
+ echo"1"; //throw new NotFoundException(__('Invalid user'));
50
54
 
51
55
  }
52
56