2

我尝试将 PersonID 的值从 list.php 传递给 Delete.php。使用锚标签

这是我的代码:

<A HREF = "Delete.php?PID = <?php echo $row['PersonID']; ?>"> Delete </A>

该值已正确传递,但不知何故我没有被重定向到 Delete.php 任何人都可以注意到上述行中的问题吗?

4

4 回答 4

7

去掉 URL 中的空格:

<a href="Delete.php?PID=<?php echo $row['PersonID']; ?>"> Delete </a>
于 2013-04-17T22:24:01.997 回答
2

删除“=”前后的空格:

<A HREF="Delete.php?PID=<?php echo $row['PersonID']; ?>"> Delete </A>
于 2013-04-17T22:24:45.597 回答
0

Code is very well written. I don't know about your database fields and your php file naming conventions but this might help you.

<a href="Delete.php?PID=<?=$row['PersonID']?>">Delete</a>

It is same as above but might be it'll helpful. Check your file name delete.php as same in your directory. check your database field name. Is it same you are using ?

于 2013-08-22T06:26:30.510 回答
0

如果你有这个:

<a href="Delete.php?PID=<?php echo $row['PersonID']; ?>">Delete</a>

线路不再有问题。您应该检查其他代码。

于 2013-04-17T22:38:28.937 回答