Ik ben een mailscript aan het aanpassen maar loop tegen een vreemd probleem aan. Alles lijkt perfect te werken maar in het mailtje dat ik uiteindelijk ontvang staat van de ingevoerde alleen de enquiry variabele.
Dit is het mailgedeelte:
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
if (tep_validate_email($email_address)) {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $name, $email_address,$enquiry);
tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
} else {
$error = true;
$messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
}
En hier haal ik de varibalen op:
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_NAME; ?></td>
</tr>
<tr>
<td class="main"><?php echo tep_draw_input_field('name'); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_EMAIL; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_input_field('email'); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
</tr>
</table></td>
Dit is het mailgedeelte:
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
if (tep_validate_email($email_address)) {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $name, $email_address,$enquiry);
tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
} else {
$error = true;
$messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
}
En hier haal ik de varibalen op:
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo ENTRY_NAME; ?></td>
</tr>
<tr>
<td class="main"><?php echo tep_draw_input_field('name'); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_EMAIL; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_input_field('email'); ?></td>
</tr>
<tr>
<td class="main"><?php echo ENTRY_ENQUIRY; ?></td>
</tr>
<tr>
<td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
</tr>
</table></td>