I have designed two forms, first one is feedbackform.html and the second one is messagesent.php.
When someone fills in the feedbackform and clicks submit, it gives the message that Thank you for message. We will respond as soon as we can. My feedback form is suppose to send me the comments to my email address but unfortunately it doesn't do that. I have checked my code again and again but can't see what I have done wrong.
Following is the code for my feedbackform.html:
My code for the messagesent.php is as follows:Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> Website comments/Suggestions <form id="frm_message" name="frm_message" method="post" action="messagesent.php"> <table width="482" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2">Website comments/Suggestions </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td>Your email address </td> <td><input name="emailaddress" type="text" id="emailaddress" size="55" /></td> </tr> <tr> <td>Subject</td> <td><label> <input name="subject" type="text" id="subject" size="55" /> </label></td> </tr> <tr> <td>Comments</td> <td><textarea name="textarea" cols="55"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Submit" /></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </form> <p> <!-- Website Contact Form Generator --> <!-- http://www.tele-pro.co.uk/scripts/contact_form/ --> <!-- This script is free to use as long as you --> <!-- retain the credit link --> </p> </body> </html>
Would someone help me please. Check the above two and see where I am going wrong.Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <p> <?php mail($_POST['jtanna1@gamil.com'], $_POST['subject'], $_POST ['textarea']); ?> </p> <p>Thank you for message. We will respond as soon as we can. </p> </body> </html>
Thanks in advance.
Jay


LinkBack URL
About LinkBacks


