[請益] "文字"資料傳遞

看板PHP作者 (芋頭)時間17年前 (2008/07/01 10:27), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
我現在有 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
文章代碼(AID): #18QPOKjL (PHP)
討論串 (同標題文章)
文章代碼(AID): #18QPOKjL (PHP)