I just purchased a landing page template from Theme Forest called "Lista". It has a built in newsletter registration form. I'm not very experienced with web design so my question is probably ridiculously easy, but... The code for the submit button is <input="submit">, which I understand is standard, but where does it submit TO? How do I define that? I need the signup forms to go to two specific Email addresses and I'm not sure how to tell it to do that.
Please help! The landing page isn't really of much use to me unless I can figure out how to get the signups sent to the right place!
That <input> should be contained within a <form>, and the <form> should have a "action=blah" attribute, where "blah" is the name of a server-side script to run when someone presses the submit button. That server-side script could do a lot of things, but in your case it would be the script that collects the fields and sends the two emails.
Whether that script exists with your canned template, or they expect you to write it, I don't know.
Dave, thanks so much for your response. This is the code from the Newsletter section... I don't see an "action" attribute but I'm also not exactly sure what I should be looking for...
<div class="notice">
<img class='alignleft' src='images/contact.png' alt=''/>
<p>* We will not forward your email address to any third party.</p>
</div>
<h2>Subscribe to our List<br /> and get your download.</h2>
<p>Subscribe to our newsletter now and get exclusive deals you wont find anywhere else straight to your inbox! Sign in and get your free product download instantly after you has confirmed your Email.</p>
<div class="notice">
<img class='alignleft' src='images/contact.png' alt=''/>
<p>* We will not forward your email address to any third party.</p>
</div>
That's just a random dead site I was hosting for a friend so that's where I'm testing the code. The actual page will be branded for a heating and air company I'm doing some marketing work for. I don't want it on their server until it works!
Thanks again for taking the time to check this out!
Well I'm a bit stumped. I can't see a <form> either, and as far as I can see, that "subscribe here" form is purely a visual example of a form, I don't see how it would actually process anything.
Perhaps I'm missing something completely, let's see if anyone else chimes in.
If it is just a visual example, what would I need to make it functional? I'm fairly decent with cobbling things together in HTML or php but like you this stumped me! Maybe I could build a different kind of form and take the input action from the source code of that and apply it to that form? I know there are sites that will let me build sign up forms and give me the code, but I don't know if that would need to be integrated with the other code in the template or what...
That will submit 3 fields in a $_POST array, to a script called mailer.php, which looks like:
PHP Code:
$email = $_POST['email'] ; $name = $_POST['name']; $subject = "this is the subject"; $message = "this is the body of the email sent from $name"; mail("avax@avax.com", $subject, $message, "From:" . $email);
Thank you again so much! I was able to use your code and tweak it to do what I needed, and the landing page is now fully functional You can check out the test version here if you care to: