Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Super Contact us enhancement 1.0


John-Peter

Recommended Posts

  • Replies 339
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hello!

 

Just tested Contact Us Super Enhancement V1.4 of 24 April 2007

It works fine but I got error message at

.../contact_us.php?action=send

 

"Your E-Mail Address does not appear to be valid - please make any necessary corrections."

 

It doesn't affect on functionality but I would be grateful for advice how to remove this error message

 

Thanks!

Sergei

Link to comment
Share on other sites

  • 2 weeks later...

Thanks to all who have worked on this contribution. After spending some time integrating and customizing this solution for my store, I figured I would post some code that I added to fix one minor issue with the way the form is populated for cases when the user enters an invalid email address. Hopefully others will find this useful.

 

Currently, all the fields except the contact reason drop-down menu are automatically re-populated when the user gets the "invalid email" warning (I honestly don't use the CONTACT_US_LIST radio/drop-down field as I prefer to route my customer messages based on the reason for contact, so I don't know if this field re-populates). This is obviously good, such that the user doesn't have to re-type everything they had previously entered.

 

I added one line of code to the Contact_Us language file (English language only, but the fix is the same for other languages) and a section to the Contact_Us.php page to address this problem. This also prevents the need to modify the Contact_US.php page if you change the number of "reasons" in the language file". The new line is at the bottom of this code (obviously my contact reasons are not the defaults,but this doesn't matter):

 

define('REASONS1', ' Merchandise Question');
define('REASONS2', ' Order-related Question');
define('REASONS3', ' Store Information Request');
define('REASONS4', ' General Comments');
define('REASONS5', ' Business-related Question');
define('REASONS6', ' Website Questions');
$contact_reason_array = array(REASONS1, REASONS2, REASONS3, REASONS4, REASONS5, REASONS6); // custom add to automate drop-down box population.  To create additional reasons, add Define statement above and add defined constant to array.

 

This contact reason array is then used in the main Contact_Us.php file as shown below. Please note that I retained a few lines before and after this drop-down box section so you can see the context. All my additions are noted with comments, as are the replaced default code lines.

 

<?php echo ENTRY_REASON; ?><br>
				<select name="reason">
					<?php 
						// custom code added to pre-select drop-down list value if it was previously selected but page was reloaded due to invalid email address

						$select_toggle = array();
						if (isset($HTTP_POST_VARS['reason'])) {
						  $reason_to_select = $HTTP_POST_VARS['reason'];
						  foreach ($contact_reason_array as $reason) {
						  	 $select_toggle[$reason] =  "";
							 $key = $reason;
							 if ($key == $reason_to_select) {
							 	$select_toggle[$reason] = " selected=\"selected\"";
							 }
						  }
						} else {
						  $i = 0;
						  foreach ($contact_reason_array as $reason) {
							if ($i == 0) {
							$select_toggle[$reason] = " selected=\"selected\"";
							} else {
							$select_toggle[$reason] = "";
							}
						  $i++;
						  }
						}
						foreach ($select_toggle as $reason => $toggle) {
							echo '<option value="' . $reason . '"' . $toggle. '>' . $reason . '</option>';
						}
						// end custom code
					/* original code which has been replaced
					<?php echo '<option value="' . REASONS1 . '">' . REASONS1 . '</option>'; ?>
					<?php echo '<option value="' . REASONS2 . '">' . REASONS2 . '</option>'; ?>
					<?php echo '<option value="' . REASONS3 . '">' . REASONS3 . '</option>'; ?>
					<?php echo '<option value="' . REASONS4 . '">' . REASONS4 . '</option>'; ?>
					<?php echo '<option value="' . REASONS5 . '">' . REASONS5 . '</option>'; ?>
					<?php echo '<option value="' . REASONS6 . '">' . REASONS6 . '</option>'; ?>
					*/

					?>
				</select><br />
				<?php echo ENTRY_ENQUIRY; ?><BR>

 

Note that the "else" portion of my added code serves to generate the default drop-down box when the page is first visited (i.e. before there is an invalid email error). I have my code set to have my first reason as the pre-selected value in this case, but you can easily adjust which reason you want pre-selected by adjusting the value condition in if($i == 0) statement.

 

Mike

Link to comment
Share on other sites

I have been doing some more tinkering to add some more functionality to the contact_us page. Again I figured I would post to see if this helps anyone or to see if anyone can detect errors in the coding.

 

There are a couple of additional functinality items I wanted to add to the contact_us page when using this contribution. The first was to add a simple checkbox that would allow that user to sign up for a newsletter/mailing list and populate the existing 'customers_newsletter' field in the customer table. This is very similar to what is done on the create_account page, but figured it would be nice to be able to to do this without forcing the user to create a full-fledged acount profile.

 

I did this by inserting the following code (I placed mine under the main message text field, but you can insert whever you like):

 

<?php 
					// custom code to add "join mailing list" checkbox
					echo tep_draw_checkbox_field('newsletter', '1', true) . ' ' . JOIN_NEWSLETTER_TEXT;
					// end custom code
				?>

 

Note, that I also defined the JOIN_NEWSLETTER_TEXT constant in the contact us langauge file, but I will omit this code here.

 

I then addded a short bit of code near the top of the file where the email message body is compiled as shown (note I have kept in a few rows before and after for context). This again involved defining the NEWSLETTER_OPT_IN_MESSAGE constant in the contact us language script.

 

}else{
	$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); // original code line which is now an else condition
}

// custom code to add newsletter subscription notification into email
if (isset($HTTP_POST_VARS['newsletter']) && ($HTTP_POST_VARS['newsletter'] == 1)) {
	$enquiry .= "\n\n" . NEWSLETTER_OPT_IN_MESSAGE;
} // end custom code

$emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT;

 

The next functionality add I will post in a seperate post below to allow for seperate replies.

Link to comment
Share on other sites

The next functionality item I wanted to add, was to upload customer names, email address, and newsletter option into the database when the contact us form is submitted. Sorry if my message above about the newsletter was unclear - the code listed there simply adds a checkbox to page and inserts a line into email message if the user elects to join the maling list. The code in this post actually writes the newsletter selection to the database along with other variables.

 

This code is inserted directly after the lines where the email address is validated and the message is sent. Please note that there are a couple of differences here from the standard Super Contact Us code. the first is that the tep_mail line uses some variables instead of constants for the email recipient name and address. This is due to some code I have above these lines (not shown) where I select the recipient based on the indicated email reason. You can simply use the regular Super Contact Us code with the constants and this will function exactly the same.

 

Also note that there is a second tep_mail line that is part of a different contribution (Admin Edit Email) which allows functionality to send a copy of the email back to user. This code should be omitted if you don't use use this contribution (the code is denoted by comments).

 

One thing I will be adding shortly is the ability to populate the address_book table with the first and last names of the user if they are not already populated. This is actually a pretty simple task that would be achived in much the same way that I update the customer table. I will post the modified code when completed.

 

As of right now, I do not overwrite any existing customer name data in the database. This code only populates these values if they are empty. Certainly if one wanted to, they could add some sort of functionality to compare and evaluate which data to keep, but I figure it is best to leave overwriting that sort of data to the account modification scripts.

 

 

    if (tep_validate_email($email_address)) {
     // original code: tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);
       tep_mail($email_recipient, $recipient_address, $emailsubject, $enquiry, $name, $email_address); // replacement code for Super Contact Us enhancement 1.41. Note: first two variables are derived from custom code above.
	  // lines added for Admin_Edit_Email functionality. This allows for an automatic response to be sent to those sending a Contact_Us message.
	if(SEND_CONTACT_US_RESPONSE=='true') {
	   tep_mail($name, $email_address, CONTACT_US_RESPONSE_EMAIL_SUBJECT, CONTACT_US_RESPONSE_EMAIL_TEXT."\n\n-------------------------Your Message:\n".$enquiry, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
	} // end Admin_Edit_Email addition

	// custom code to seperate first name and last name (ignores middle names if provided)
    $namearray = explode(' ',$name);
    $namecount = sizeof($namearray)-1;
    $firstname = $namearray[0];
    $lastname = $namearray[$namecount]; //custom code end

	// custom code to check for newsletter checkbox setting
	if (isset($HTTP_POST_VARS['newsletter']) && ($HTTP_POST_VARS['newsletter'] == 1)) {
     		$newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']);
   	} else {
     		$newsletter = false;
   	} // end custom code

	// add custom code to add user information from contact us fields into database - modeled after code on create_account.php page
	// note $email_address variable has already been prepared for database input above
	// check to see if email address already exists in database
	$check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
       $check_email = tep_db_fetch_array($check_email_query);
       if ($check_email['total'] > 0) {
		// email address already exists in database, so we query other related data for customer table
		$customer_table_query = tep_db_query("SELECT customers_id, customers_default_address_id, customers_firstname, customers_lastname, customers_newsletter FROM " . TABLE_CUSTOMERS . " WHERE customers_email_address = '" . tep_db_input($email_address) . "'");
		$customer_table_data = tep_db_fetch_array($customer_table_query);
		$customer_id = $customer_table_data['customers_id'];
		// zero out key variables
		$address_id = 0;
		$update_needed = 0;
		$sql_data_array = array();
		$inserttoggle = 0; // end variable reset
		// check related customer info and address book tables to verify that there are corresponding row entries for this customer id.  If not they are added.
		$customer_info_table_query = tep_db_query("SELECT count(*) as total from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . tep_db_input($customer_id) . "'");
		$customer_info_table_data_check = tep_db_fetch_array($customer_info_table_query);
		if ($customer_info_table_data_check['total'] == 0) {
			tep_db_query("INSERT INTO " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");
		}
		$address_book_table_query = tep_db_query("SELECT count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . tep_db_input($customer_id) . "'");
		$address_book_table_data_check = tep_db_fetch_array($address_book_table_query);
		if ($address_book_table_data_check['total'] == 0) {
			tep_db_query("INSERT INTO " . TABLE_ADDRESS_BOOK . " SET customers_id = '" . (int)$customer_id . "'");
			$address_id = tep_db_insert_id();
		} // end check of related tables

		$check_customers_default_address_id = isset($customer_table_data['customers_default_address_id']);
		$check_customers_firstname = isset($customer_table_data['customers_firstname']);
		$check_customers_lastname = isset($customer_table_data['customers_lastname']);
		$check_customers_newsletter = isset($customer_table_data['customers_newsletter']);
		// build customer table update query based on comparison of already existing values to values entered in form
		$customer_table_update_query = "UPDATE " . TABLE_CUSTOMERS . " SET ";
		if ($check_customers_default_address_id === false) {
			$customer_table_update_query .= "customers_default_address_id = '" . $address_id . "' ";
			$update_needed = 1;
		}
		if ($check_customers_firstname === false) {
			$customer_table_update_query .= "customers_firstname = '" . $firstname . "' ";
			$update_needed = 1;
		}
		if ($check_customers_lastname === false) {
			$customer_table_update_query .= "customers_lastname = '" . $lastname . "' ";
			$update_needed = 1;
		}
		if ($check_customers_newsletter === false) {
			$customer_table_update_query .= "customers_newsletter = '" . $newsletter . "' ";
			$update_needed = 1;
		} elseif ($customer_table_data['newsletter'] == false && $newsletter == 1) {
			$customer_table_update_query .= "customers_newsletter = '" . $newsletter . "' ";
			$update_needed = 1;
		}
		$customer_table_update_query .= "WHERE customers_id = '" . (int)$customer_id . "'";
		if ($update_needed == 1) tep_db_query($customer_table_update_query); // update customer table if needed
	} else {
		// used when no existing email address exists in database 
		$sql_data_array = array();
		// create array for uploading to customer table and upload
		$sql_data_array = array('customers_firstname' => $firstname,
                             	'customers_lastname' => $lastname,
							'customers_email_address' => $email_address,
                             	'customers_newsletter' => $newsletter);
		tep_db_perform(TABLE_CUSTOMERS, $sql_data_array);
		$customer_id = tep_db_insert_id();
		// modify array and add to address book
		$sql_data_array = array('customers_id' => $customer_id,
                             	'entry_firstname' => $firstname_for_db,
                             	'entry_lastname' => $lastname_for_db);
		tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
		$address_id = tep_db_insert_id();
		// further modify customer and customer info tables
		tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");
		tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())");
	}

Edited by mikebrant
Link to comment
Share on other sites

Hi

Many thanks for this contribution which i have added to my site today. All works well until i click 'continue' to send the form. On the next page i receive the following two messages

1.Your E-Mail Address does not appear to be valid - please make any necessary corrections.

2. Your enquiry has been successfully sent to the Store Owner.

 

When i check my email account all is received as required. Any ideas as to what is wrong? page can be seen at http://www.m0jon.co.uk/catalog/contact_us.php (warning adult site)

 

Many thanks m0jon

Link to comment
Share on other sites

Hi

Many thanks for this contribution which i have added to my site today. All works well until i click 'continue' to send the form. On the next page i receive the following two messages

1.Your E-Mail Address does not appear to be valid - please make any necessary corrections.

2. Your enquiry has been successfully sent to the Store Owner.

 

When i check my email account all is received as required. Any ideas as to what is wrong? page can be seen at http://www.m0jon.co.uk/catalog/contact_us.php (warning adult site)

 

Many thanks m0jon

 

mojon,

 

I had this problem for a while. What I found the issue was is that in the contribution documentation, they tell you to change a few lines of code where you reload the page (tep_redirect function) to pass or detect (isset) the parameter action="success" when it really does not need to be changed. I messed around with this for several hours before finally figuring out that you pretty much need to leave the code as it was. What happens is that you end up changing the email validation warning to appear on action=success when that should not be happening. Take a look at the complete contact_us.php code I posted just before your message to get a better idea of which isset and tep_redirect lines should should have send vs. success as the action parameter (you can ignore the other modifications I made to this file if you don't need that functionality, the redirect and isset lines were not altered by my modifications other than to change them back to where they work). Note that I also added a component to many of the "isset" lines to check whether the $error flag was set to 1 as well.

 

Mike

Link to comment
Share on other sites

mojon,

 

I had this problem for a while. What I found the issue was is that in the contribution documentation, they tell you to change a few lines of code where you reload the page (tep_redirect function) to pass or detect (isset) the parameter action="success" when it really does not need to be changed. I messed around with this for several hours before finally figuring out that you pretty much need to leave the code as it was. What happens is that you end up changing the email validation warning to appear on action=success when that should not be happening. Take a look at the complete contact_us.php code I posted just before your message to get a better idea of which isset and tep_redirect lines should should have send vs. success as the action parameter (you can ignore the other modifications I made to this file if you don't need that functionality, the redirect and isset lines were not altered by my modifications other than to change them back to where they work). Note that I also added a component to many of the "isset" lines to check whether the $error flag was set to 1 as well.

 

Mike

Hi Mike

 

Thank you for your quick response. I've tried to re install this contribution again but not getting much closer. The form now does not go onto next page "success your email has been sent" I really like this Contact Us Page but need it to work. Wondered if you could cast an eye over my contact_us.php code to see where i'm going wrong

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
   $name = tep_db_prepare_input($HTTP_POST_VARS['name']);
   $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
   // BOF Super Contact us enhancement 1.41

$order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']);

if ($order_id <> NULL){

   		$enquiry = 'Order ID: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

}else{

	$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

}



$emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT;

   if (tep_validate_email($email_address)) {

       tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address);

if (CONTACT_US_LIST !=''){

	$send_to_array=explode("," ,CONTACT_US_LIST);

	preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array);

	$send_to_email= eregi_replace (">", "", $send_email_array[0]);

	$send_to_email= eregi_replace ("<", "", $send_to_email);



	tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address);

}else{

  //tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));

     tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=send'));

}

// EOF Super Contact us enhancement 1.41
   } else {
     $error = true;

     $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
   }
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if ($messageStack->size('contact') > 0) {
?>
     <tr>
       <td><?php echo $messageStack->output('contact'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
     <tr>
       <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<!-- BOF Super Contact us enhancement 1.41 //-->

<?php

 } else {

 if (tep_session_is_registered('customer_id')) {

   $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

   $account = tep_db_fetch_array($account_query);



   $name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];

   $email = $account['customers_email_address'];

 }

?>

<tr><td>



<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents"><td><table><tr>

        <td class="main" valign="top" width=40%><b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br>

               <?php echo (OPENING_HOURS); ?><br><br></td>

               <td class="main" valign="top" width="60%"><?php echo ENTRY_NAME; ?><br>

				<?php echo tep_draw_input_field('name'); ?><br />

				<?php echo ENTRY_EMAIL; ?><br>

				<?php echo tep_draw_input_field('email'); ?><br />

				<?php echo ENTRY_ORDER_ID; ?><br>

				<?php echo tep_draw_input_field('order_id'); ?><br />

				<?php

	                                               if (CONTACT_US_LIST !=''){

				  echo SEND_TO_TEXT . '<br>';

			                  if(SEND_TO_TYPE=='radio'){

			                  foreach(explode("," ,CONTACT_US_LIST) as $k => $v) {

			               if($k==0){

				$checked=true;

				}else{

				$checked=false;

				}

				echo tep_draw_radio_field('send_to', "$k", $checked). " " .preg_replace('/\<[^*]*/', '', $v);

			              }



		                            }else{

			              foreach(explode("," ,CONTACT_US_LIST) as $k => $v) {

					$send_to_array[] = array('id' => $k, 'text' => preg_replace('/\<[^*]*/', '', $v));

				 }

       		                                           echo tep_draw_pull_down_menu('send_to',  $send_to_array);

		                             }



		                            echo ;

		                            }

                                                                     ?>

                                                                   <?php echo ENTRY_REASON; ?><br>

				<select name="reason">

					<?php echo '<option value="' . REASONS1 . '">' . REASONS1 . '</option>'; ?>

					<?php echo '<option value="' . REASONS2 . '">' . REASONS2 . '</option>'; ?>

					<?php echo '<option value="' . REASONS3 . '">' . REASONS3 . '</option>'; ?>

					<?php echo '<option value="' . REASONS4 . '">' . REASONS4 . '</option>'; ?>

					<?php echo '<option value="' . REASONS5 . '">' . REASONS5 . '</option>'; ?>

					<?php echo '<option value="' . REASONS6 . '">' . REASONS6 . '</option>'; ?>



				</select><br />

				<?php echo ENTRY_ENQUIRY; ?><BR>

                   <?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?>

                   <br />

                   </td></tr></table></td>

</tr>

</table>

<br />

<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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

               <td align="right"><?php echo tep_image_submit('button_send.gif', IMAGE_BUTTON_CONTINUE); ?></td>

               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

             </tr>

           </table></td>

         </tr>

       </table></td></tr>   

<?php

 }

?>

<!-- EOF Super Contact us enhancement 1.41 //-->
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Once again many thanks

http://www.m0jon.co.uk/catalog/contact_us.php

m0jon

Link to comment
Share on other sites

Hi Mike

 

Thank you for your quick response. I've tried to re install this contribution again but not getting much closer. The form now does not go onto next page "success your email has been sent" I really like this Contact Us Page but need it to work. Wondered if you could cast an eye over my contact_us.php code to see where i'm going wrong

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

 $error = false;
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
   $name = tep_db_prepare_input($HTTP_POST_VARS['name']);
   $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
   // BOF Super Contact us enhancement 1.41

$order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']);

if ($order_id <> NULL){

   		$enquiry = 'Order ID: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

}else{

	$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

}
$emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT;

   if (tep_validate_email($email_address)) {

       tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address);

if (CONTACT_US_LIST !=''){

	$send_to_array=explode("," ,CONTACT_US_LIST);

	preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array);

	$send_to_email= eregi_replace (">", "", $send_email_array[0]);

	$send_to_email= eregi_replace ("<", "", $send_to_email);
	tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address);

}else{

  //tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));

     tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=send'));

}

// EOF Super Contact us enhancement 1.41
   } else {
     $error = true;

     $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
   }
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if ($messageStack->size('contact') > 0) {
?>
     <tr>
       <td><?php echo $messageStack->output('contact'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
     <tr>
       <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<!-- BOF Super Contact us enhancement 1.41 //-->

<?php

 } else {

 if (tep_session_is_registered('customer_id')) {

   $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

   $account = tep_db_fetch_array($account_query);
   $name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];

   $email = $account['customers_email_address'];

 }

?>

<tr><td>
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents"><td><table><tr>

        <td class="main" valign="top" width=40%><b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br>

               <?php echo (OPENING_HOURS); ?><br><br></td>

               <td class="main" valign="top" width="60%"><?php echo ENTRY_NAME; ?><br>

				<?php echo tep_draw_input_field('name'); ?><br />

				<?php echo ENTRY_EMAIL; ?><br>

				<?php echo tep_draw_input_field('email'); ?><br />

				<?php echo ENTRY_ORDER_ID; ?><br>

				<?php echo tep_draw_input_field('order_id'); ?><br />

				<?php

	                                               if (CONTACT_US_LIST !=''){

				  echo SEND_TO_TEXT . '<br>';

			                  if(SEND_TO_TYPE=='radio'){

			                  foreach(explode("," ,CONTACT_US_LIST) as $k => $v) {

			               if($k==0){

				$checked=true;

				}else{

				$checked=false;

				}

				echo tep_draw_radio_field('send_to', "$k", $checked). " " .preg_replace('/\<[^*]*/', '', $v);

			              }
		                            }else{

			              foreach(explode("," ,CONTACT_US_LIST) as $k => $v) {

					$send_to_array[] = array('id' => $k, 'text' => preg_replace('/\<[^*]*/', '', $v));

				 }

       		                                           echo tep_draw_pull_down_menu('send_to',  $send_to_array);

		                             }
		                            echo ;

		                            }

                                                                     ?>

                                                                   <?php echo ENTRY_REASON; ?><br>

				<select name="reason">

					<?php echo '<option value="' . REASONS1 . '">' . REASONS1 . '</option>'; ?>

					<?php echo '<option value="' . REASONS2 . '">' . REASONS2 . '</option>'; ?>

					<?php echo '<option value="' . REASONS3 . '">' . REASONS3 . '</option>'; ?>

					<?php echo '<option value="' . REASONS4 . '">' . REASONS4 . '</option>'; ?>

					<?php echo '<option value="' . REASONS5 . '">' . REASONS5 . '</option>'; ?>

					<?php echo '<option value="' . REASONS6 . '">' . REASONS6 . '</option>'; ?>
				</select><br />

				<?php echo ENTRY_ENQUIRY; ?><BR>

                   <?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?>

                   <br />

                   </td></tr></table></td>

</tr>

</table>

<br />

<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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

               <td align="right"><?php echo tep_image_submit('button_send.gif', IMAGE_BUTTON_CONTINUE); ?></td>

               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

             </tr>

           </table></td>

         </tr>

       </table></td></tr>   

<?php

 }

?>

<!-- EOF Super Contact us enhancement 1.41 //-->
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Once again many thanks

http://www.m0jon.co.uk/catalog/contact_us.php

m0jon

PANIC OVER

 

Managed to sort out the 'Send' and 'Success' elements in the end but thank you for your comments and help much appreciated.

 

m0jon

Link to comment
Share on other sites

PANIC OVER

 

Managed to sort out the 'Send' and 'Success' elements in the end but thank you for your comments and help much appreciated.

 

m0jon

 

Sorry, I just saw your posted code. I am glad you got it worked out anyway.

 

Mike

Link to comment
Share on other sites

Hi

 

I have tried version 1.4 and 1.41 but can't get it to work.

 

If I follow the instructions as per the installation notes, when I click "continue" to submit the form, I get this:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

(the url is www.***/contact_us.php?action=send)

 

The email is however sent out OK.

 

If I fail to enter an email address, I get this:

 

Contact Us

Error Your E-Mail Address does not appear to be valid - please make any necessary corrections.

Your enquiry has been successfully sent to the Store Owner.

 

But the email isn't of course sent!

 

 

 

I have tried changed the code in the light of the previous replies, but don't seem to have quite got it working correctly.

 

Any advice would be welcome.

 

richard

 

 

 

I have tried

Link to comment
Share on other sites

Hi

 

I have tried version 1.4 and 1.41 but can't get it to work.

 

If I follow the instructions as per the installation notes, when I click "continue" to submit the form, I get this:

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

(the url is www.***/contact_us.php?action=send)

 

The email is however sent out OK.

 

If I fail to enter an email address, I get this:

 

Contact Us

Error Your E-Mail Address does not appear to be valid - please make any necessary corrections.

Your enquiry has been successfully sent to the Store Owner.

 

But the email isn't of course sent!

I have tried changed the code in the light of the previous replies, but don't seem to have quite got it working correctly.

 

Any advice would be welcome.

 

richard

 

Oops:

 

I had a formating error in the list of email addresses.

 

Still had to alter code to get it to return correctly though...

 

Looks great now.

 

r.

Link to comment
Share on other sites

To anyone who get a blank page, this may bay due to PHP5 and/or MySQL5.

Do this:

Find:
echo;

Replace with:
echo ' ';

 

Please note that there should be a space between the echo and the ; in the first line, it doesn't show up correctly in the forum.

Edited by dr_lucas
Link to comment
Share on other sites

  • 4 weeks later...

Good Morning, I Installed this contribution this morning and I am thrilled it went so smoothly, because of my host I had to set it so the emails come from our domain, [email protected] so to speak. I got that figured out, woohoo. Now I need to figure out how to include the customers email into the subject of the email that I receive, that one Im stumped, does anyone know how? Thanks, Michelle

Link to comment
Share on other sites

  • 3 weeks later...

hey guys i have installed this contribution but having a little problem...... When i click the send button nothing happens. i have changed this code as well

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) also added the email addresses in admin side but still nothing... any help is appreciated

 

thankyou

Link to comment
Share on other sites

  • 4 weeks later...

I've spent all of last night trying to get this to work and still haven't. The form looks right and the messages are being sent but I keep getting an Apache server error. When I make some changes to "success" and "send" is seems to work fine but no messages are sent. Please help me with this...

Here is last code I tried:

<?php
/*
 $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

 $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']);
// BOF Super Contact us enhancement 1.4
$order_id = tep_db_prepare_input($HTTP_POST_VARS['order_id']);
if ($order_id <> NULL){
		$enquiry = 'Order ID: ' . $order_id . "\n\n" . tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
}else{
	$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
}

$emailsubject = tep_db_prepare_input($HTTP_POST_VARS['reason']) . ' ' . EMAIL_SUBJECT;
if (tep_validate_email($email_address)) {
	tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $emailsubject, $enquiry, $name, $email_address);
if (CONTACT_US_LIST !=''){
	$send_to_array=explode("," ,CONTACT_US_LIST);
	preg_match('/\<[^>]+\>/', $send_to_array[$send_to], $send_email_array);
	$send_to_email= eregi_replace (">", "", $send_email_array[0]);
	$send_to_email= eregi_replace ("<", "", $send_to_email);

	tep_mail(preg_replace('/\<[^*]*/', '', $send_to_array[$send_to]), $send_to_email, $emailsubject, $enquiry, $name, $email_address);
}else{
  //tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
  tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
}
// EOF Super Contact us enhancement 1.4
} else {
  $error = true;

  $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
 }

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="760" cellspacing="0" cellpadding="0" align = "center">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if ($messageStack->size('contact') > 0) {
?>
  <tr>
	<td><?php echo $messageStack->output('contact'); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
  <tr>
	<td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<!-- BOF Super Contact us enhancement 1.4 //-->
<?php
 } else {
 if (tep_session_is_registered('customer_id')) {
$account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$account = tep_db_fetch_array($account_query);

$name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
$email = $account['customers_email_address'];
 }
?>
<tr><td>

<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents"><td><table><tr>
	 <td class="main" valign="top" width=40%><b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br>
			<?php echo (OPENING_HOURS); ?><br><br></td>
			<td class="main" valign="top" width="60%"><?php echo ENTRY_NAME; ?><br>
				<?php echo tep_draw_input_field('name'); ?><br />
				<?php echo ENTRY_EMAIL; ?><br>
				<?php echo tep_draw_input_field('email'); ?><br />
				<?php echo ENTRY_ORDER_ID; ?><br>
				<?php echo tep_draw_input_field('order_id'); ?><br />
				<?php
												   if (CONTACT_US_LIST !=''){
				  echo SEND_TO_TEXT . '<br>';
							  if(SEND_TO_TYPE=='radio'){
							  foreach(explode("," ,CONTACT_US_LIST) as $k => $v) {
						   if($k==0){
				$checked=true;
				}else{
				$checked=false;
				}
				echo tep_draw_radio_field('send_to', "$k", $checked). " " .preg_replace('/\<[^*]*/', '', $v);
						  }

									}else{
						  foreach(explode("," ,CONTACT_US_LIST) as $k => $v) {
					$send_to_array[] = array('id' => $k, 'text' => preg_replace('/\<[^*]*/', '', $v));
				 }
													   echo tep_draw_pull_down_menu('send_to',  $send_to_array);
									 }

									echo;
									}
																  ?>
																<?php echo ENTRY_REASON; ?><br>
				<select name="reason">
					<?php echo '<option value="' . REASONS1 . '">' . REASONS1 . '</option>'; ?>
					<?php echo '<option value="' . REASONS2 . '">' . REASONS2 . '</option>'; ?>
					<?php echo '<option value="' . REASONS3 . '">' . REASONS3 . '</option>'; ?>
					<?php echo '<option value="' . REASONS4 . '">' . REASONS4 . '</option>'; ?>
					<?php echo '<option value="' . REASONS5 . '">' . REASONS5 . '</option>'; ?>
					<?php echo '<option value="' . REASONS6 . '">' . REASONS6 . '</option>'; ?>

				</select><br />
				<?php echo ENTRY_ENQUIRY; ?><BR>
				<?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15, tep_sanitize_string($_POST['enquiry']), '', false); ?>
				<br />
				</td></tr></table></td>
</tr>
</table>
<br />
<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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td></tr>   
<?php
 }
?>
<!-- EOF Super Contact us enhancement 1.4 //-->
</table></form></td>
<!-- body_text_eof //-->

 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

I've spent all of last night trying to get this to work and still haven't. The form looks right and the messages are being sent but I keep getting an Apache server error. When I make some changes to "success" and "send" is seems to work fine but no messages are sent. Please help me with this...

What is the apache server error?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...