Gossamer Forum
Home : Products : DBMan : Customization :

2 Problems...login and email notification.

Quote Reply
2 Problems...login and email notification.
I recently ran into 2 problems I'm hoping someone can help me with. The first is when I use the password lookup and get the lookup_success page with the login...when someone re-logs in with their username and new password and clicks submit, the screen goes blank. My background and images are there, but nothing else. I couldnt seem to find out where in the sub that it tells the system to go to the html_home page after successful login from the lookup_success page.

Also, I am still having a problem with my email notification after a user enters their personal information record. Even though the email address is there, on the screen and in the database, I still keep getting the error that says " No recipient addresses found in header". My email field is exactly the same as in the html_record, html_record_form and when it calls it in the add_success page, but for some reason, the email notification sub isnt recognizing the email address. Here is my add_success sub....

Code:
The following registration has been successfully completed.<br>
You may now add your property listing(s).<p></FONT>
|;
%rec=&get_record($in{$db_key});
&html_record(%rec);

if ($rec{'Email'}) {
open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: $in{'Email'}\n";
print MAIL "From: $admin_email\n";

By the way, this is in my users.pl file. I have an email notification in my html.pl (default db) file that is setup identical to this one and it works fine.
Quote Reply
Re: [wdu2002] 2 Problems...login and email notification. In reply to
Bumping up in hopes of some help.Unsure
Quote Reply
Re: [wdu2002] 2 Problems...login and email notification. In reply to
As for the second question: try $rec{'Email'} instead of $in{'Email'}.

As for the first question: look at the name of the submit-button of the form. Then go to db.cgi and check, in sub main, whether there's a line like if ($in{'name_of_submit_button'}) { &do_this_or_that;}
kellner

Last edited by:

kellner: Mar 7, 2002, 12:43 PM
Quote Reply
Re: [kellner] 2 Problems...login and email notification. In reply to
Thank you kellner, I managed to get it fixed.
Quote Reply
Re: [wdu2002] 2 Problems...login and email notification. In reply to
Quote:
Thank you kellner, I managed to get it fixed.
Are you going to tell what you did to correct the problem so as to help others who may encounter the problem? ;-)
Quote Reply
Re: [Karen] 2 Problems...login and email notification. In reply to
Sorry, I did just what Kellner suggested. I changed the email field to $rec{'Email'} instead of $in{'Email'}. I thought that it needed to use the $in function since it was "inserting" the value of the email field, but obviously not.

As far as the lookup_success login, I realized that I had some html problems in my html_home which is why it wasn't showing up.

Simple stuff, but after a while, everything just starts to run together and its hard to pick up the smallest stuff. LOL Wink
Quote Reply
Re: [wdu2002] 2 Problems...login and email notification. In reply to
Just for clarification: whenever you use values which are passed through a form, you can access them with %in, e.g. $in{'firstfield'}. So, in a way, $in is short for "user input" (though the name is really completely arbitrary - in theory, you could also code dbman using %humptydumpty instead of %in).

I suspect that in your case, the email-address had not been passed through the form, therefore its value was not available to you. %rec was available, therefore I suggested this change.
kellner