osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Contact Us page allows for blank message.

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 09-17-2005, 01:26 PM
pigdestroyer's Avatar
New Member
 
Join Date: Jan 2004
Location: London
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
pigdestroyer
Default Contact Us page allows for blank message.

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'));
    }

  }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 08:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax