4 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 10+ items on Envato Market
humenbean says

Not sure how to link a send button to my email address. I tried a few things but my domain is having issues. I wanted to see if anyone knew so I could just fix it and stop playing trial and error.

Thank you!

Name: Email:

This is what I currently have. Let me know if this is correct or if I need to change it. I really appreciate it.

faevilangel_designs
faevilangel_designs Recent Posts Threads Started
83 posts
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Located in United Kingdom
faevilangel_designs says
Not sure how to link a send button to my email address. I tried a few things but my domain is having issues. I wanted to see if anyone knew so I could just fix it and stop playing trial and error.

Thank you!

Name: Email:

This is what I currently have. Let me know if this is correct or if I need to change it. I really appreciate it.

thats totally wrong, unfortunately, you need to know php to do a contact form… the html will be

<form action="sendmail.php" method="post"> <input type="text" name="name" / <br /> <input name="email" type="text" /> <br /> <textarea name="message" rows="6" cols="70"></textarea> <br /> <input type="submit" value="submiit form" /> </form>

You then send the person to a file called sendmail.php and it will send the email, as follows

<?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $name = $_REQUEST['name'] ; if (!isset($_REQUEST['email'])) { header( "Location: http://www.garethgillman.co.uk/contact.php" ); } elseif (empty($email) || empty($message) || empty($name)) { header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" ); header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); header( "Cache-Control: no-cache, must-revalidate" ); header( "Pragma: no-cache" ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ERROR!</title> </head> <body> <h2 class="title"> Contact Form Error!</h2> <p><a href="contact.php">Click here to try again</a></p> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-5252906-5"); pageTracker._trackPageview(); } catch(err) {}</script> </body> </html> <?php } else { mail( "myname@mydomain.com", "Feedback Form Results", $message, "From: $email" ); header( "Location: /thankyou.php" ); } ?>

Save the code above as sendmail.php, and then change the email address “myname@mydomain.com” to your e-mail address

you need a server with php functionality and sendmail service enabled

by
by
by
by
by
by