Re: [未解決] 商品詳細本文でPHPの実行
フォーラム › 使い方全般 › [未解決] 商品詳細本文でPHPの実行 › Re: [未解決] 商品詳細本文でPHPの実行
2012年8月6日 2:21 PM
#65180
zilchr2
参加者
スクリーンショットをとりました。
PHPがない状態
[attachment=7769,140]
PHPがある状態
[attachment=7769,142]
また商品詳細本文には下記を記載しています。
よろしくお願いします。
<?php
//DB接続
mysql_connect('localhost', 'root', '') or die(mysql_error());
mysql_select_db('company_info');
mysql_query('SET NAMES UTF8');
//データ抽出
$sql=sprintf("SELECT * FROM company WHERE user_id = %s",
mysql_real_escape_string(usces_memberinfo('ID','return')));
$recordSet = mysql_query($sql);
$data = mysql_fetch_assoc($recordSet);
?>
<div id="itempages">
<div class="companyinfo">
<table>
<tr>
<th scope="row">
商号(会社名)
</th>
<td>
<?php print(htmlspecialchars( $data['cname'], ENT_QUOTES )); ?>
</td>
</tr>
<tr>
<th>
会社名(英語表記)
</th>
<td>
<?php print(htmlspecialchars( $data['cename'], ENT_QUOTES )); ?>
</td>
</tr>
</table>
</div>
</div>
※ 2.png (53.5 KB, 2 downloads) 6 分 oldは間違ってアップしてしまいましたので気にしないでください。