in reply to Re^4: Premature end of script headers issue
in thread Premature end of script headers issue
Change the following
tomy $sth = $dbh->prepare("SELECT * FROM $users_table WHERE username = ' +$username' AND user_password = '$userpass'"); $sth->execute;
It is a more secure way of doing things (protects against arbitrary SQL code injection attacks -- has nothing to do with your present problem)my $sth = $dbh->prepare("SELECT * FROM $users_table WHERE username = ? + AND user_password = ?"); $sth->execute($username,$userpass) or die $dbh->errstr;
The only reason I can see why your script sometimes runs and sometimes doesn't run is in a combination of inputs which skips the execute code. Are you sure all the if ... then ... else ...-logic is OK?
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Premature end of script headers issue
by Anonymous Monk on Jan 10, 2005 at 21:48 UTC | |
by CountZero (Bishop) on Jan 10, 2005 at 22:18 UTC |