ArtbyPatrick Posted October 30, 2013 Author Share Posted October 30, 2013 then maybe the error is from the form itself as it is not sending an email to the admin nor a confirmation email to the user. But after looking at the code itself, it seems that I have everything entered correctly, but again I am no expert at php. Here is the code from the contact page that I believe is responsible to send the email: require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($_GET['action']) && ($_GET['action'] == 'send')) { $name = tep_db_prepare_input($_POST['name']); $email_address = tep_db_prepare_input($_POST['email']); $enquiry = tep_db_prepare_input($_POST['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); // tep_mail("info@itnexus.ca", "info@itnexus.ca", EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } Is this the correct way ? Thanks for all of your help Link to comment Share on other sites More sharing options...
justsomeguy Posted October 30, 2013 Share Posted October 30, 2013 That looks fine, but it's using all custom functions. It's also checking if $_GET['action'] is set to "send", so the form tag needs to look something like this, with the action attribute: <form action="send_mail.php?action=send" ... If the action URL doesn't have that "?action=send" in the end of it, then that check won't pass and nothing will be sent. Link to comment Share on other sites More sharing options...
ArtbyPatrick Posted October 31, 2013 Author Share Posted October 31, 2013 yes here is what I found in the code as action: <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"> so I believe, if I am not mistaking, this counts as the <form action="action=send"> Am I right? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 31, 2013 Share Posted October 31, 2013 I'm not sure what that code produces, you would need to pull up the page in a browser and view the HTML source to see what that printed. Link to comment Share on other sites More sharing options...
ArtbyPatrick Posted October 31, 2013 Author Share Posted October 31, 2013 it produced this: <td width="100%" valign="top"><form name="contact_us" action="http://www.unisondigital.com/store.php?action=send" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="0"> if I am not mistaking Technically it should work right? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 31, 2013 Share Posted October 31, 2013 Yeah, that looks fine. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now