You may be interested in use strict; and use warnings; for development, but be sure to at least turn off warnings for production.
As to your question of how the query string affects the page display, your code is difficult to follow -- at least trying to reconcile what it appears to do, with what you say it does/should. While I cannot speculate as to your intent, you may be interested in the following:
$mode = "default"; if($cur->param("mode")) { $mode = $cur->param("mode"); }
Can be condensed: $mode = $cur->param('mode') or 'default';
while (<TEMPLATE>){ $page .= $_; }
This is probably more efficent in "slurp" mode:
{ local $/; $page .= <TEMPLATE>; }
Actually, you may have answered your own question:
print_form() returns the form to be filled out, delete_appointments handles removal from the db and does not return anyting, updatE_day adds to database and returns error if any, and display returns the list of reservations.
The problem appears to lie in the subs themselves. I'd recommend making a new sub display_reservations with code from sub update_day, and invoked from both sub update_day and sub delete_appointments. Please post the code for the subs if you require further assistance.
In reply to Re: No update after delete
by eibwen
in thread No update after delete
by intranetman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |