Tommy28 Posted August 13, 2010 Posted August 13, 2010 Hi, I would like to add some more fields to my contact us page so that my costumers can type in: City, street, phonenumber ect.. And ofc. i need these informations in the email im getting when they click "Send" Which .php file desides that the info in the text field is added to the email but not the other fields? I already added som extra fields to my contact_us.php and they are showing on my contact us page, but only the info from the text field is in the mail im getting. I need "new" information to be posted in the same place in the email i recieve, as the Text field information(enquiry) Ill just add my contact_us file, hope some1 out there can help me ;) i already tried in a danish forum without any luck.. Bg Tommy <?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 © 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']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_NAME, STORE_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=send')); } 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"> <meta name="robots" content="noindex, nofollow"> </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="0" cellpadding="0" class="pageBody"> <tr> <?php // added by GrafikStudiet if (LAYOUT_COLUMN_LEFT_SHOW == 'Ja') { ?> <td width="<?php echo LAYOUT_COLUMN_LEFT_WIDTH; ?>" valign="top" class="columnLeft"> <table border="0" width="<?php echo LAYOUT_COLUMN_LEFT_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table> </td> <?php } ?> <!-- body_text //--> <td width="100%" valign="top" class="columnCenter"> <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=success')); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="pageContents"> <tr> <td class="pageContents"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="pageHeading"> <tr> <td class="pageHeading"> <h1><?php echo HEADING_TITLE; ?></h1></td> <?php // added by GrafikStudiet if (LAYOUT_SHOW_PAGE_HEADING_ICON == 'Ja') { ?> <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> <?php } ?> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '3'); ?></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.jpg', 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"> <tr> <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> <?php } else { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_1; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_3; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('telefon'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_2; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_4; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('mærke'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_5; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('model'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_6; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('motor'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_7; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('årgang'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_8; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('Brændstof'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_9; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('registeringsnummer'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_10; ?></td> </tr> <tr> <td><?php echo tep_draw_input_field('by'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_12; ?></td> </tr> <tr> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table></td> </tr> </table></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"> <tr> <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 } ?> </table> </td> </tr> </table> </form></td> <!-- body_text_eof //--> <?php // added by GrafikStudiet if (LAYOUT_COLUMN_RIGHT_SHOW == 'Ja') { ?> <td width="<?php echo LAYOUT_COLUMN_RIGHT_WIDTH; ?>" valign="top" class="columnRight"> <table border="0" width="<?php echo LAYOUT_COLUMN_RIGHT_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table> </td> <?php } ?> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
multimixer Posted August 13, 2010 Posted August 13, 2010 Hi, I would like to add some more fields to my contact us page so that my costumers can type in: City, street, phonenumber ect.. And ofc. i need these informations in the email im getting when they click "Send" Which .php file desides that the info in the text field is added to the email but not the other fields? I already added som extra fields to my contact_us.php and they are showing on my contact us page, but only the info from the text field is in the mail im getting. I need "new" information to be posted in the same place in the email i recieve, as the Text field information(enquiry) Ill just add my contact_us file, hope some1 out there can help me ;) i already tried in a danish forum without any luck.. Bg Tommy Here you can read about how to add more fields to the contact us form -> email issues My community profile | Template system for osCommerce - New: Responsive | Feedback channel
Tommy28 Posted August 13, 2010 Author Posted August 13, 2010 Hi Multimixer, First of all thanks a ton for your time! I changed contact_us.php as you posted in solution C. And i get the mail send success page when i click send, but nothing pops into my inbox?? I also tried to apply your solution B. without any effect. Bg Tommy
hideveloper Posted August 13, 2010 Posted August 13, 2010 What is your site url please Dev "A great minds can do anything" www.hideveloper.com
Tommy28 Posted August 13, 2010 Author Posted August 13, 2010 Cant tell atm, sorry. I hope you guys can help me anyways ;) Bg Tommy
Recommended Posts
Archived
This topic is now archived and is closed to further replies.