na_da Posted September 21, 2011 Share Posted September 21, 2011 Apologies if this is in the wrong section! I am sorting out a site that has a t&c section before the user enters the website, basically people need to accept the terms and conditions of the site - then enter their email address, when the user hits submit the email they enter needs to be sent to my email address, and then the page redirects to the home pageI have basically got it in essence the only thing i cant seem to make it do is send the email address they enter to my email address - this is the code I have so far:<----------form method="post" onsubmit="this['redirect'].value = this['redirect'].value + '?EMAIL=' + this['email'].value;" action="/?page_id=4"><div align="left"><font face="Verdana, Arial, Helvetica, sans-serif"> Email:<input type="text" size="20" name="email"><input type="submit" name="submit" class="home-sections" value="Accept"><input type="hidden" value="/?page_id=4=" name="redirect"><input type="hidden" value="myemail@myemail.com" name="mailto"><br></font> </div></form-----------> If anyone can help on point me in the right direction I would really appreciate it. Link to comment Share on other sites More sharing options...
Ingolme Posted September 21, 2011 Share Posted September 21, 2011 Do you have a server-side script processing this?What's with all the hyphens? <----------form </form-----------> Link to comment Share on other sites More sharing options...
na_da Posted September 21, 2011 Author Share Posted September 21, 2011 No script at all i'm using wordpress and need the email addresses sent to an inbox rather than a database. <------- i used the hyphens as I posted on a different forum and had to block out the code. Link to comment Share on other sites More sharing options...
Ingolme Posted September 21, 2011 Share Posted September 21, 2011 You're sending the form to wordpress, wordpress is a server-side script. Are you sure that wordpress is programmed to do what you want? Link to comment Share on other sites More sharing options...
na_da Posted September 21, 2011 Author Share Posted September 21, 2011 i just want a basic function so a user can input their email address when they hit agree to the terms and conditions - there email address is sent to my email and the page redirects them to the home page - i just need to keep a tab of who is looking at the site. I dont need a database - just a simple piece of code Link to comment Share on other sites More sharing options...
Ingolme Posted September 21, 2011 Share Posted September 21, 2011 It looks like you want a simple PHP mail script. W3Schools already has that covered: http://w3schools.com/php/php_mail.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.