in reply to Re: Form Post Problems
in thread Form Post Problems
I had actually isolated the problem, but was then told that I should post the code in its entirety in Seekers of Perl Wisdom instead of Snippets.
The fact of the matter is that whenever a user selects "Delete" from the web page, the CGI program does not recognize the "Delete" parameter and removes all reservations from the page instead of just the one selected. I know this is a problem with the display_appointments function in addition to the fact that the key, when pressed, is not recognized.
Basically, when its pressed, its a binary value. So as long as its not pressed all the appointments will display. But when you hit delete they all disappear from the web page but not the database because they are all of the same "submit form" instance.
How do I go about making separate instances for each appointment and then checking to see which appointment has been chosen based on "delete instance"?
I have also tried using an array to store the return value, but the same thing happens.
Is there any way to say:
if($cur->param("Delete") {
# call delete appointments"
}
so that it checks each instance of delete to see which one was pressed?? The above statement doesn't work because "Delete" can't be set in the "action" part of the form."