in reply to my first database
First up, SHOW TABLES isn't an SQL statement, so don't use that: something like $dbh->table_info is more like it.
Second up, you issue a disconnect to your database before you try to prepare your "SQL". There's no chance of that working at all - if you add or die $dbh->errstr after prepare and execute statements you might get some better information (you are checking the webserver log file?)
Third up, you're issuing an end_html command and then printing some more lines (spaced with tabs - which a browser wouldn't honour anyway).
Fourth up, even if you move the end_html after the db related prints, it's going to print them out whether or not the submit is pressed - you need something like if (defined($cgi->param('submit')) {print ...} in there somewhere.
I suspect that you're in for a steep learning curve - have a look in Tutorials: there are several well written articles on the DBI and CGI topics.
rdfield
|
|---|