(php) Delete being performed on page load instead of on submit-button click
I'm building a Delete Record page in PHP using Dreamweaver's server behaviors, following the instructions in the DW Help.
It's working - except the delete seems to be happening upon delete-carpet.php being loading, without the Submit button on that page being clicked.
I have a page (choose.php) which allows the user to locate the record he wants to delete. Clicking on that link is supposed to take him to the Delete page (delete-carpet.php), which I built following the directions in the DW Help.
I can see that the URL parameter is being passed, and in fact, the delete is successful. BUT, the Delete page itself, with the hidden form field and server behavior, doesn't even appear - only the "success" page that it re-directs to.
In other words, when I click the "Delete" link, which looks like this:
<a href="delete-carpet.php?carpet_id=<?php echo $row_GetCarpets['carpet_id']; ?>
I thought that I should be getting a URL like this:
delete-carpet.php?carpet_id=9
But instead, I get this:
success.php?carpet_id=9
It seems to be just performing the delete without needing the user to click the Submit button.
I've read through the directions and re-created this so many times that either I'm still missing something, or else the instructions are missing something. Any help is much appreciated.
--
Patty Ayers | www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate Worksheet
--
