helo, my problem is that, i have a form using in a template file and action to a cgi page.But whenever i refresh the page, the the entered values are getting inserted again.How can i prevent this ????
Following is the code using in the template file.following is the code in the cgi page.<body > <form name="group" method="post" action="process.cgi"> <div id="mainContainer"> <div><label>Group name : </label><input type= +"text" name= "group_save0"> <label>Group description : </label><input typ +e="text" name= "group_save1"> </div> </div> <div><input type = "submit" name ="firstsave" +value = "Save"></div> </form> </body>
if ($grupsave1 ne '') { if ($grupsave1 =~ /^([-\@\w\s.]+)$/) { $grupsave1 = $1; print $grupsave1; } else { die "Bad data for group name('$grupsave1') in group"; } if ($grupsave2 =~ /^([-\@\w\s.]+)$/) { $grupsave2 = $1; print $grupsave2; } else { die "Bad data for group description('$grupsave2') in g +roup"; } my $grupsave_insert = $dbh->do (q{INSERT INTO group_management (group_ +name,group_description,isactive) VALUES (?,?,?)}, undef, ($grupsave1, +$grupsave2,'y')); } else { }
In reply to How to prevent a Reload from resubmitting a form? by gayu_justin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |