This is a discussion on Contact Us page allows for blank message. within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; After recieving several blank messages today, it seems that there is no error checking to stop the actual message content ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| After recieving several blank messages today, it seems that there is no error checking to stop the actual message content being blank. I assume this isn't ideally supposed to happen. I have used the following method to solve this in contact_us.php. Code:
$error = false;
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)) {
$error = true;
$messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
if ($enquiry == '') {
$error = true;
$messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR);
}
if ($error == false) {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);
tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
}
}
|
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Contact US Page being SPAMMED | Impreza25r | osCMax v1.7 General Mods Discussion | 2 | 02-18-2006 04:37 PM |
| Contact Us page not sending email | bhejr | osCMax v2 Features Discussion | 4 | 01-09-2006 05:26 PM |
| add a field to contact us page | stevensdesign | osCMax v1.7 General Mods Discussion | 1 | 08-01-2005 03:37 AM |
| What to add Contrib for contact us page | Kristine | osCMax v1.7 Discussion | 2 | 04-08-2004 01:31 PM |
| adding to the contact up page? | Kristine | osCMax v1.7 Discussion | 0 | 03-25-2004 03:58 AM |