Post by leelnj » Fri Dec 07, 2012 6:16 pm

Hello All
Thanks in advance

I am trying to create a subscribe form in my footer. MY CODE WHICH I ENTERED IN THE FOOTER.TPL FILE IS BELOW.

<div class="column">
<form action="http://[your store url]/phpForm.php" method="post" enctype="multipart/form-data" name="contactForm" id="contactform">
<h3>Subscribe</h3>
<label>Subscribe for the latest updates and offers</label><br /><br />
<input type="text" name="contactFirstName" /><br /><br />
<input type="text" name="contactEmail" /><br /><br />
<input type="button" value="SEND" id="submit1" />
</form>
</div>

i have then created a seperate php form posted below. The problem is the button is not clicking at all. its acting like an image with no button mechanism…Any ideas. Thanks

<?php
if($_POST["contactFirstName"]){
$contactFirstName = stripslashes($_POST["contactFirstName"]);
$contactEmail = stripslashes($_POST["contactEmail"]);
$to = "[PUT YOUR ADMIN EMAIL ADDRESS HERE]";
$subject = "Contact form Submitted";
$theEmail = "$contactFirstName $contactLastName ($contactEmail) sent a message through your form! Their message was: $contactMessage";
$headers = "Content-type: text/html\r\n";
$headers .= "From: admin@youropencartstore.com\r\n";
mail($to, $subject, $theEmail, $headers);
$to2 = "$leadEmail";
$subject2 = "Thanks, we have your message!";
$theEmail2 = "
<h1>Thanks for subscribing!</h1>
";
$headers2 = "Content-type: text/html\r\n";
$headers2 .= "From: mail@youropencartstore.com\r\n";
mail($to2, $subject2, $theEmail2, $headers2);
header("location: http://www.youropencartstore.com/thanks");
}
?>

New member

Posts

Joined
Wed Dec 05, 2012 2:26 am

Post by anung » Sat Dec 08, 2012 8:16 pm

Try to put the javascript code to execute your form.

User avatar
Active Member

Posts

Joined
Fri Mar 30, 2012 10:32 am
Location - Indonesia

Post by kurta » Mon Mar 18, 2013 11:59 pm

There is also the possibility to generate the token?

New member

Posts

Joined
Wed Oct 31, 2012 7:30 pm
Location - Italy
Who is online

Users browsing this forum: No registered users and 322 guests