看板 PHP 關於我們 聯絡資訊
我現在有 A B C 三個網頁 內容如下: A網頁: (將text的內容傳到B.php) <form method="POST" action="B.php"> <intput type="text" name="text"> </form> B網頁: (接收text內容並且列出資料庫的資料 然後做成連結傳到C.php) $test = $_POST["text"]; $query = mysql_query(" SELECT name FROM $test "); while( $data = mysql_fetch_row($query) ) { <a href="C.php"><? echo $data[0] ?></a> <form method="POST" action="C.php"> <input type="hidden" name="kerker" value="<?=$test; ?>"> </form> <form method="POST" action="C.php"> <input type="hidden" name="ker" value="<?=$data[0]; ?>"> </form> } C網頁: $a = $_POST["kerker"]; $b = $_POST["ker"]; echo $a,$b; 問題: 我現在可以做到在B.php可以將每筆資料作成超連結 但是我想將超連結的檔名($data[0]) 和 $test 傳到C.php 也就是假設有三筆超連結資料 x y z 我點選x 就會將x傳到C.php 選y 就會將y傳到C.php ... 但是我現在沒有辦法將資料傳到C.php並且將$a和$b ehco 出來 請問一下我哪裡出錯嗎(php的標籤我沒有打上去<?...?>) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.115.185.85