in reply to Perl CGI Database Connectivity

To get the value of your form parameters, use CGI's param method, e.g.

my $submit = param( 'logbtn' ); if ( $submit eq 'Insert' ) { # insert into database here } else { # display form here }

To make your code cleaner, you may want to look into a templating system like HTML::Template or Template Toolkit. And if this is going to be a complicated application with many screens, there are frameworks available that let you avoid writing a huge tree of if/else blocks. My favorite is CGI::Application.

Update: You really should also be using strict and warnings is a good idea too.