Did you get my latest code?
In regards to your original code, my guess is that action parameter for your form is invalid. I've never done it that way - I've instead used hidden fields. So in your $action eq 'add' branch, set the action of the form to the name of your cgi script. Then add a hidden field:
# ...
}elsif($action eq "add"){
print start_html(-title=>$title.' Enter your name');
print start_form(-action=>"myscript.cgi"), # is that the name?
hidden( 'action', 'add' ),
textfield('name','Enter Your name',20),
submit('submit'),reset,
end_form,end_html;
# ...
HTH & Have Fun!
- Jason
PS: Drop by the #cgiapp channel & we can help you further... |