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

However if nonsense is typed in - ie. the record is not in the database, all I get is an internal sever error.

Check your server's error logs.

I see a couple of problems. The zero'th problem is that you aren't showing us any code that takes data from a form and injects it into a WHERE clause. How can you expect to us to diagnose a problem when you're not showing us the right code?

Another problem is that you're waiting far too long to print a response header. Do that right up top, before you start opening up database connections and firing off queries.

And I don't think

print p (end_html);
is doing what you expect it to do.

Replies are listed 'Best First'.
Re: Re: MySQL/DBI: Error if entry is not in the database
by CountZero (Bishop) on Feb 05, 2003 at 20:29 UTC
    I would even dare to add: not only check your server's error logs but show them to us as well! (of course only the relevant parts, or before you know it someone dumps a few meg of server error logs on this site ;-) )

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law