Hi guys, I have no idea how to do this so im asking for help and if this is a simple thing for you, remember im not a coder at all so bare with me. I have a form on in my design that i got from the coder that coded my design, and it looks like this at the moment. And i want it to send a email to my email address when ever the form is used, can some one please help me and show me how I can do that. Thank you <table width="300" border="0"> <tr> <td width="156" style="text-align: left"><div align="left">Your Name:</div></td> <td width="310" align="left"><div align="left"> <input name="" type="text" style="width: 240px;"/> </div></td> </tr> <tr> <td style="text-align: left;"><div align="left">Your Email Address:</div></td> <td><div align="left"> <input name="input" type="text" style="width: 240px;"/> </div></td> </tr> <tr> <td valign="top" style="text-align: left;"><div align="left">Your Message:</div></td> <td><div align="left"> <textarea name="textarea" cols="20" rows="10" style="width: 240px;"></textarea><br /><br /> <input name="button1" type="button" value="Send it!" /> </div></td> </tr> </table> HTML:
Well i know some code is missing and thats confusing me since im not a coder i dont know where to ad what, I can edit as long as the code is there I assume im looking for some one that can add/edit missing code
Okay here is what you have to do. Copy and paste this where your old one used to be: <form name="email" method="post" action=""> <table width="300" border="0"> <tr> <td width="156" style="text-align: left"><div align="left">Your Name:</div></td> <td width="310" align="left"><div align="left"> <input name="name" type="text" style="width: 240px;"/> </div></td> </tr> <tr> <td style="text-align: left;"><div align="left">Your Email Address:</div></td> <td><div align="left"> <input name="input" type="text" style="width: 240px;"/> </div></td> </tr> <tr> <td valign="top" style="text-align: left;"><div align="left">Your Message:</div></td> <td><div align="left"> <textarea name="textarea" name="message" cols="20" rows="10" style="width: 240px;"></textarea><br /><br /> <input name="button1" type="submit" value="Send it!" /> </div></td> </tr> </table> </form> HTML: Now you have to add the PHP to do this go to the top of the page that contains the message form and add this code: <? if ($_POST['button1']){ $name = strip_tags($_POST['name']); $email = $_POST['input']; $message = strip_tags($_POST['message']); $myemail = 'you@youremail.com'; $header = "from: $name <$email>"; mail($myemail, $subject, $message, $header); echo "Message Sent"; } ?> HTML: Hope this helps if not drop me an email at jonathan@n33t.co.uk. I don't know who coded this for you but they haven't done a very good job.
Thank you so much, Im at work now but I will do this as soon as I get back home. Im not blaming the coder because he was just supposed to do a PSD to XHTML job and he did a good job I think, this is something extra.. Thank you once again for taking your time to help me out.
If you can't get it to work properly or ever get hung up again on forms there is a great place call mycontactform that has copy paste web based form creation for people that lack code experience. I used them a long time ago before I knew how..