php での値の転送に関する問題 専門家をお探しですか?
Jun 13, 2016 pm 01:38 PM
php 传值的问题 求高手
<form name="form" method="post" action="">
<table width="560" height="430" border="0" align="center" cellpadding="0" cellpacing="0" id="__01">
<tr>
<td valign="top">< table width="60%" border="0" align="center">
<tr>
<td width="94"><div align="center" class=" STYLE1">标题</div></td>
<td width="264" height="40"><div align="center" class="STYLE1">作成者< ;/div></td>
<td width="264" height="40"><div align="center" class="STYLE1">公開時間</div>< ;/td>
</tr>
<?php
/*连接続数架*/
$conn=mysql_connect("localhost","root","111");
mysql_select_db("register",$conn);
mysql_query("set names utf8");
$arr=mysql_query("select * from luntan",$conn);
/*使用中语循環句环mysql_fetch_array()関数数返される数グループ*/
while($result=mysql_fetch_array($arr)){
?>
<tr>
<td height="25" > <a href="clc.php?id= <?php echo $result["id"];?>"> <?php echo $result['bt'];?> </a>
</td>
<td height="25"><?php echo $result['zuozhe'];?>
</td>
<td height="25"><?php echo $result['fs'];?>
</td>
< ;/tr>
<?php
} //循環中
?>
</table></td>
</tr>
</table>
</form>
我要在http://localhost/wosheji/lantan/clc.php?id= 6这个页面怎么看到id=6对应着的「コンテンツ」 ?
------解决方案-----
- PHP コード
................................接続データ库代記号省略................................ $result=mysql_query("select * from 表名 where id=$_GET['id']"); $arr=mysql_fetch_assoc($result); print_r($arr); <br><font color="#e78608">------解决方案---------</font><br>http://localhost/wosheji/lantan /clc.php?id= 6页面中追加<br>if(!empty($_GET)){<br> print_r($_GET);<br>}<br>看看输出什么,如果有id值,那么 if の表式に #1 の内容 <div class="clear"> を追加</div>

人気の記事

人気の記事

ホットな記事タグ

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック











PHP で MySQL クエリのパフォーマンスを最適化するにはどうすればよいですか?

PHP で MySQL のバックアップと復元を使用するにはどうすればよいですか?

データベースにおける Java 列挙型のアプリケーション シナリオは何ですか?

PHP を使用して MySQL テーブルにデータを挿入するにはどうすればよいですか?

MySQL 8.4 で mysql_native_password がロードされていないエラーを修正する方法

PHP で MySQL ストアド プロシージャを使用するにはどうすればよいですか?

PHP を使用して MySQL テーブルを作成するにはどうすればよいですか?
