データベースに追加したものを修正するためのフォームのページなのですが、商品説明文だけ表示されません。
何かどこを変えたらいいかわかる方がいらっしゃいましたら、宜しくお願い致します。
関係あるか分かりませんが参照のページではすべて表示されます。商品説明文は改行されていませんが、データベースでは改行されています。
$sql='SELECT kategorie,name,setumei,size,price,gazou FROM mst_made WHERE code=?'; $stmt=$dbh->prepare($sql); $data[]=$made_code; $stmt->execute($data); $rec=$stmt->fetch(PDO::FETCH_ASSOC); $made_kategorie=$rec['kategorie']; $made_name=$rec['name']; $made_setumei=$rec['setumei']; $made_size=$rec['size']; $made_price=$rec['price']; $made_gazou_name_old=$rec['gazou']; $dbh=null; if($made_gazou_name_old=='') { $disp_gazou=''; } else { $disp_gazou='<img src="./gazou/'.$made_gazou_name_old.'">'; } } catch(Exception $e) { print 'ただいま障害により大変ご迷惑をお掛けしております。'; exit(); } ?> オーダー商品修正<br> <br> オーダー商品コード<br> <?php print $made_code; ?> <br> <br> <form method="post" action="made_edit_check.php" enctype="multipart/form-data"> <input type="hidden" name="code" value="<?php print $made_code; ?>"> <input type="hidden" name="gazou_name_old" value="<?php print $made_gazou_name_old; ?>"> カテゴリー<br> <input type="text" name="kategorie" style="width:300px" value="<?php print $made_kategorie; ?>"><br> オーダー商品名<br> <input type="text" name="name" style="width:300px" value="<?php print $made_name; ?>"><br> オーダー商品説明文<br> <textarea name="setumei" rows="6" cols="40" wrap=hard value="<?php print $made_setumei; ?>"></textarea><br> サイズ<br> <input type="text" name="size" style="width:300px" value="<?php print $made_size; ?>"><br> 価格<br> <input type="text" name="price" style="width:50px" value="<?php print $made_price; ?>">円<br> <br> <?php print $disp_gazou; ?> <br> 画像を選んでください。<br> <input type="file" name="gazou" style="width:400px"><br> <br> <input type="button" onclick="history.back()" value="戻る"> <input type="submit" value="OK"> </form>
回答1件
あなたの回答
tips
プレビュー