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.
<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>
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!
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:
$email = $_POST['email'] ; $name = $_POST['name']; $subject = "this is the subject"; $message = "this is the body of the email sent from $name"; mail("firstname.lastname@example.org", $subject, $message, "From:" . $email);