in reply to Re: MySQL/DBI: Error if entry is not in the database
in thread MySQL/DBI: Error if entry is not in the database

Thanx guys - the code jasonk suggested works fine.
Ta for everyone's comments. I have to admit I'm not sure how to check my server error logs <blush>
I use CGI::Carp qw(fatalsToBrowser); and hope that tells me what I need to know

I only started doing CGI scripts last week so I'm still confused about some basic stuff -
I commented out the content-type line because I didn't like it literally
printing Content-type:text/html\n\n in my browser window !

What do you mean I would get an error if I left the Content-type line out ? I don't...
Thanks
basm101

As dws thought it might help to see my code that gets data from the form
here it is
#!/biol/programs/perl/bin/perl -w use strict; use DBI; use CGI qw(:standard); #print "Content-type:text/html\n\n"; my($cgi); $cgi = new CGI; use CGI::Carp qw(fatalsToBrowser); print "Content-type:text/html\n\n"; print <<EOF; <HTML> <HEAD><TITLE>My Database</TITLE></HEAD> <BODY BGCOLOR="#CCCCFF" TEXT="indigo"> <h2>My Database</h2><HR> <TABLE> <TR VALIGN="baseline"> <TD><h3>Enter name</h3></TD> <FORM METHOD="post" ACTION="my_server_here"> <TD><INPUT TYPE="TEXT" NAME="querybox" SIZE="50"></TD> <TD><INPUT TYPE="SUBMIT"> </FORM> </TR> </TABLE> </BODY> </HTML> EOF