Gossamer Forum
Home : Products : DBMan : Installation :

maybe a little of topic ....

Quote Reply
maybe a little of topic ....
I am trying to write the contents (userid, email, and pw) of the Sign Up form to a text document for Admin purposes (so if someone forgets their password, i can email it to them). I can get the Email field to Print to the text file, no prob...but the other two fields do not work... here is part of my code

open(LAST, ">>$latest") | | die $!;
print LAST "Userid: &in{'userid'}\n";
print LAST "Pass: &in{'pw'}\n";
print LAST "Email: $in{'Email'}\n\n";
die "Error appending to file database.txt $!\n";
close(LAST);

thanks for any help!
Quote Reply
Re: maybe a little of topic .... In reply to
That's because it's $in{'username'} and $in{'password'}. I know I should be more consistent in naming.. Smile

Also, I assume this:

die "Error appending to file database.txt $!\n";

is just for debugging?

Cheers,

Alex
Quote Reply
Re: maybe a little of topic .... In reply to
still no luck - it prints $in{'username'} and $in{'password'}. I had this same problem with FormMail from Matts Archive. I can get the email to print, but nothing else.....
Quote Reply
Re: maybe a little of topic .... In reply to
I'm not sure if it's a typo or not, but in your orginal post you entered:

print LAST "Userid: &in{'userid'}\n";
print LAST "Pass: &in{'pw'}\n";

If you took that directly from your script, it should be:

print LAST "Userid: $in{'userid'}\n";
print LAST "Pass: $in{'pw'}\n";

Or, with Alex's correction:

print LAST "Userid: $in{'username'}\n";
print LAST "Pass: $in{'password'}\n";

Then again, it could have just been a typo when you posted the question.



------------------
JPD
Quote Reply
Re: maybe a little of topic .... In reply to
man, you guys are awesome! on my computer $ and & look pretty darn close Smile