2013-04-21 26 views
-1

Here is the code I am using.如何將多個變量傳輸到一個php頁面使用<a href

<a href="delete_ac.php?id=<? echo $rows['id'];?>">delete</a></td> 

Basically I want to send the table it came from to:

<a href="delete_ac.php?id=<? echo $rows['id']"; 
table=<? echo $tbl_name>">delete</a></td> 
+0

Just add an '&' ampersand between the variables, ie 'delete' – Jon 2013-04-21 18:32:41

+0

您的問題不清楚。 – 5ervant 2013-04-21 18:54:41

回答

0

Please check these codes!

This is the first code:

<a href="delete_ac.php?id=<?php echo $rows['id']; ?>">delete</a></td> 

And the second code:

<a href="delete_ac.php?id=<?php echo $rows['id']; ?>&table=<?php echo $tbl_name; ?>">delete</a></td> 
2

Like this : with the & operator

<a href="delete_ac.php?id=<?php echo $rows['id'];?>&table=<?php echo $tbl_name; ?>">delete</a> 
  • First parameter : ?
  • The next ones : &
+1

應該引用:'... & table = ...' – coudy 2013-04-21 18:36:16

+0

@coudy不,如果你試圖顯示它,是的,但在分離變量的鏈接中,如果這樣會導致它不能正常工作。 – Jon 2013-04-21 18:51:02

+0

@Jon HTML中出現的任何地方都代表一個實體,包括一個屬性。所以@coudy是正確的,它應該是'?id = foo & bar = baz'。這是HTML驗證器強調的常見錯誤。 – IMSoP 2013-04-21 19:10:11

2

Correction

<a href="delete_ac.php?id=<? echo $rows['id']"; ?> 
&table=<? echo $tbl_name;?>">delete</a></td> 
+0

證僞:* * – 5ervant 2013-04-21 19:09:03

+0

證僞?你究竟是什麼意思?這是如何做到這一點的一個很好的例子。當然,那裏有一個錯字,但就是這樣。 – Jon 2013-04-21 19:18:01

+0

@Jon約定......我只想提一下她*上的錯字「更正」*。 http://www.thefreedictionary.com/falsification – 5ervant 2013-04-22 04:07:17

相關問題