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

In reply to Re: Re: MySQL/DBI: Error if entry is not in the database by Anonymous Monk
in thread MySQL/DBI: Error if entry is not in the database by basm101

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.