I can't find them, to tell you the truth. I'm on a new webhost I haven't been with before and I'm just getting used to Cpanel XP.

I did make progress by modifing to the code below. It doesn't kill the script now (who knows why) but it doesn't sign in either. By adding the print header line the 500 error is gone but it doesn't say the login was successfull or the login failed. So I'm thinking it has something to do with the database lines.

Anyone have any ideas?

else { print "Content-type: text/html\n\n"; use CGI::Carp qw(fatalsToBrowser); print "test<br><br>"; #exit; $username = (param('form_user')); $userpass = (param('form_pass')); $userpass = md5_hex($userpass); #check the database my $dbh = DBI->connect("DBI:mysql:$edt_dbase", $mysql_user, $m +ysql_pass) or print DBI->errstr; my $sth = $dbh->prepare("SELECT * FROM $users_table WHERE user +name = '$username' AND user_password = '$userpass'"); $sth->execute; print "test 2"; if ($sth->rows < 1) { print "Content-type: text/html\n\n"; print "Login information incorrect."; $dbh->disconnect; print "<script>window.location = 'login.cgi';</script>\n"; exit; }

In reply to Re^2: Debugging a login script using MySQL by coldfingertips
in thread Debugging a login script using MySQL by coldfingertips

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.