This is in ref to the password MOD, i have got the MOD to work fine but i would like to change a few things. But i really need help.
Firstly i would like to change it so that any errors use one template and success uses another template. The current script has a template for when no e-mail is specified but thats it. I would like the message "No record of email in our database" to be included in this template to:
I tried this
sub process_form {
my ($found, @values, @match);
# Make sure we have an email address to send the info to
!$email and &site_html_send_email_error ("No email address specified") and return;
!$notfound and &site_html_send_email_error ("That e-mail is not in our database") and return;
And changed:
# If no matching record found, display error message to user
if ($found < 1) {
print "$notfound\n";
exit;
} # end of if
That works but if you type in a correct e-mail it brings up the not in database error.
Also instead of header and footer files i would just like to use a template for the success page.
Thus in conclusion i would like to remove the header and footer fuction and merge the "No e-mail entered" and "No such e-mail in our database" error into using one template (send_email_error.html) and create one success template.
I hope i have explained myself well.
Firstly i would like to change it so that any errors use one template and success uses another template. The current script has a template for when no e-mail is specified but thats it. I would like the message "No record of email in our database" to be included in this template to:
I tried this
sub process_form {
my ($found, @values, @match);
# Make sure we have an email address to send the info to
!$email and &site_html_send_email_error ("No email address specified") and return;
!$notfound and &site_html_send_email_error ("That e-mail is not in our database") and return;
And changed:
# If no matching record found, display error message to user
if ($found < 1) {
print "$notfound\n";
exit;
} # end of if
That works but if you type in a correct e-mail it brings up the not in database error.
Also instead of header and footer files i would just like to use a template for the success page.
Thus in conclusion i would like to remove the header and footer fuction and merge the "No e-mail entered" and "No such e-mail in our database" error into using one template (send_email_error.html) and create one success template.
I hope i have explained myself well.