質問するログイン新規登録

回答編集履歴

2

微修正

2016/10/01 22:27

投稿

fromageblanc
fromageblanc

スコア2724

answer CHANGED
@@ -56,7 +56,7 @@
56
56
  try{
57
57
  $sql="update goods set Price=?, GoodsName=? where GoodsID=?";
58
58
  $stmt=$pdo->prepare($sql);
59
- $array=array($_POST['NewPrice'],$_POST['NewGoodsName'],$global_var);
59
+ $array=array($_POST['NewPrice'],$_POST['NewGoodsName'],$_POST['GoodsID']);
60
60
  $res2=$array;
61
61
  $stmt->execute($array);
62
62
 

1

\+ と \. を間違えた

2016/10/01 22:27

投稿

fromageblanc
fromageblanc

スコア2724

answer CHANGED
@@ -14,7 +14,7 @@
14
14
  if(isset($_POST['update2'])){
15
15
  try{
16
16
  // ++++ 追加 ++++
17
- $hidden_tag_for_update_form = '<input type="hidden" name="GoodsID" value="' + $_POST['GoodsID'] + '">';
17
+ $hidden_tag_for_update_form = '<input type="hidden" name="GoodsID" value="' .$_POST['GoodsID']. '">';
18
18
 
19
19
  $sql="select * from goods where GoodsID=?";
20
20
  $stmt=$pdo->prepare($sql);