godwasadj 0 Report post Posted October 17, 2010 Hi Guy's and Girls,I'm having some trouble with a stock flash site i downloaded to edit. Basically i'm trying to link up the SUBMIT button in the contact us page to my email and, being quite frank, i'm a noob. Any help would be greatly appreciated.The current code just reads <input name="Send" type="submit" value="SUBMIT" class="submit" id="send" size="16"/> Share this post Link to post Share on other sites
web_designer 7 Report post Posted October 23, 2010 hi godwasadj, welcome in Xisto community i hope you will like your time in here.and about the code you posted, it is not related to how you can connect your email to a form. to be more clear, you can't connect the code of submit button with your email, because it is only a way to tell the browser that you want to send the information in the form you filled now. but you can create a PHP file, name it (mail.php for example) that contains the code of your email, usually it will be like this: <?php $to = "YOUR EMAIL SHOULD BE HERE"; $subject = "Contact Us"; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if($sent) {print "OK"; } else {print "We encountered an error"; } ?> and your form should contains this code:<form method="post" action="mail.php">Name<input type="text" name="name" /><br/>E-mail<input type="text" name="email" /><br/>Message <textarea name="message" cols="50" rows="10" > </textarea><br/> <input type="submit" value="send" /><br/> </form> as you can see, the action attribute is what will connect your form with the PHP file that contains your email. i hope that will helps you a little, good luck. Share this post Link to post Share on other sites