...

View Full Version : Email Form Processing - Confirmation Issues



sundevil67
03-20-2009, 12:25 AM
I have installed a script called Dodosmail to handle my form processing. Everything works OK, but I would like to make two adjustments, and I am having a bit of difficulty.

On the confirmation page and on the email I receive, I would like to omit the email confirmation and verification code confirmation fields, as they are just repetitive.

The working form is here (http://www.adamfialkov.com/contact.php)

The PHP code is here (http://www.adamfialkov.com/common/dodosmail.phps)

The If statement that generates the information I need to modify is here:


if(in_array($actual_var, $reserved_vars))
echo "";
else {
if(is_array($$actual_var)) {
echo "<li>$actual_var: ";
foreach($$actual_var as $actual_val) {
echo "$actual_val ";
}
echo "</li>\n";
} else {
$actual_val = stripslashes($$actual_var);
echo "<li>$actual_var: $actual_val</li>\n";
}
}

I've tried to add my own IF statements to pick out the Email2 and VerificationCode2 fields, but I can't get it to work. Any advice would be appreciated!

tomws
03-20-2009, 04:31 AM
I copied the whole if block for context. I think you want to place your checks in the last nested else block.

if(in_array($actual_var, $reserved_vars)) {
$inside_mail = $inside_mail;
} else {
if(is_array($$actual_var)) {
$inside_mail.= "$actual_var: ";
foreach($$actual_var as $actual_val) {
$inside_mail.= "$actual_val ";
}
$inside_mail.= "\n";
} else {
/* NEW--> */ if ($actual_val != "Email" && $actual_val != "VerificationCode2") {
$actual_val = stripslashes($$actual_var);
$inside_mail.= "$actual_var: $actual_val\n";
/* NEW--> */ }
}
}

sundevil67
03-20-2009, 07:09 AM
Using that block (just had to change the quoted variable values to $Email2 & $VerificationCode2). It seems to work except the 'Message' field that comes after the VerificationCode2 field seems to get lost...weird...not sure I understand why. Thanks for looking!



if(in_array($actual_var, $reserved_vars)) {
$inside_mail = $inside_mail;
} else {
if(is_array($$actual_var)) {
$inside_mail.= "$actual_var: ";
foreach($$actual_var as $actual_val) {
$inside_mail.= "$actual_val ";
}
$inside_mail.= "\n";
} else {
if ($actual_val != $Email2 && $actual_val != $VerificationCode2) {
$actual_val = stripslashes($$actual_var);
$inside_mail.= "$actual_var: $actual_val\n";
}
}
}

tomws
03-20-2009, 03:53 PM
I don't understand why, either... unless the test values entered into the form were the same for email2 and message. For example, did you type something like "asdf" into every field to test? Since it's comparing variable values instead of input names, that could be an issue, and should be patched even if that isn't the cause of the current problem.

sundevil67
03-20-2009, 09:39 PM
It looks like it is just an issue with where the statements are placed... that conditional sort of stops things; in other words, if I place the 'message' field above the Email2 and VerificationCode2 fields, it will work.

http://www.adamfialkov.com/contact.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum