我想刪除(或更新)MySql
到PHP
的記錄。這裏的選項有:Href V/s表格提交
一。
<a href="process.php?pid=3&cid=10" role="button" class="btn btn-danger">Delete</a>
二。
<form action="process.php" method="post"><input type="hidden" name="pid" value="3"><input type="hidden" name="cid" value="10"><button type="submit" class="btn btn-danger">Delete</button></form>
後來,我將從process.php
重定向。那麼,哪一個更好,我可能知道爲什麼?
在這兩個選項中,它都在工作(刪除或其他)。我只想問的形式有什麼優勢提交
看到http://stackoverflow.com/questions/7436205/get-or-post-for-deletion – Sean
[GET或POST爲刪除](HTTP的可能的複製://計算器。 com/questions/7436205/get-or-post-for-deletion) –
@Anant都在爲我工作。我只想知道哪一個比另一個更有優勢 –