in reply to Re^3: perl grep help!
in thread perl grep help!

i added:
print "please enter a username /n"; my $usernameentered = <STDIN>; print "please enter a password /n"; my $passwordentered = <STDIN>;
to the top of the script i also changed the ? to a real username and password it failed with the following.... DBD::mysql::st execute failed: called with 2 bind variables login.pl line 16. SQL Error: called with 2 bind variables when 0 are needed im guessing this maybe becasue this is where my <STDIN> where meant to go? sorry to keep bombarding you with questions but im really stuck! bogglemaster89 UPDATE- I replaced what I typed with question marks, it runs now, but im not sure what to do to get it to match these passwords and if they dont match through an error.......to the end-user of course not me!

Replies are listed 'Best First'.
Re^5: perl grep help!
by marto (Cardinal) on Mar 09, 2010 at 18:05 UTC

    Read chomp and read the DBI documentation on placeholders. Given that you had to be told not to pull back all of the rows of a table and compare the values of each row, I suggest you learn some basic SQL also. There are many good resources online. You don't seem to be taking the advice you're given in reply to your various questions.

      Thankyou so much! :-D it works now! errm it was because of chomp.....ive used these before and SQL but I have a memory problem (its medical, trust me im not talking BS) so I literally forget pretty much everything after a week or two!

        Sounds to me like a good reason to keep notes.