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를 참조 [GET 또는 삭제 POST (HTTP의 – Sean
가능한 중복 : // 유래. co.kr/questions/7436205/get-for-post-for-deletion) –
@Anant는 모두 나를 위해 작동합니다. 나는 단지 하나 이상의 다른 것보다 유리한 것을 알고 싶다. –