member102 Posted March 25, 2014 Share Posted March 25, 2014 (edited) There seems to be a problem with this contact form i'm using... moreover when I recieve the mail I get weird characters (I guess that has to do with encoding Utf-8 but I'm not sure how to implement that) contact.php <form action="query_contact.php" method="post" enctype="multipart/form-data" name="form" id="contact-form"> <?php if ($_GET[reason] != $nil && $_GET[reason] != pass) { ?> <?PHP } if ($_GET[reason] != pass) { ?> 'headers' => 'From: "' . $data['name'] . '" <' . $data['email'] . ">\r\n" . "MIME-Version: 1.0\r\n" . 'Content-type: text/plain; charset=utf-8' <fieldset> <label><span class="text-form">Name:</span> <input type="text" name="NAME" value="<?php echo $_POST[NAME]; ?>" /> </label> <label><span class="text-form">Adress:</span> <input type="text" name="ADRESS" value="<?php echo $_POST[ADRESS]; ?>" /> </label> <label><span class="text-form">Tel:</span> <input type="text" name="TEL" value="<?php echo $_POST[TEL]; ?>" /> </label> <label><span class="text-form">E-mail:</span> <input type="text" name="EMAIL" value="<?php echo $_POST[EMAIL]; ?>" /> </label> <div class="wrapper"> <div class="text-form">Message:</div> <div class="extra-wrap"> <textarea type="text" name="COMMENTS" /><?php echo $_POST[COMMENTS]; ?></textarea> <div class="clear"></div> <div class="buttons"> <a class="button" onclick="document.getElementById('contact-form').reset();">Clear</a> <a class="button" onclick="verify();">Send</a></div> </div> </div> </fieldset> <?PHP } if ($_GET[reason] == pass) {?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td >Thanks for contacting us</td> </tr> </table> <?PHP } ?> </form> query_contact.php <?PHP @include 'sendmail.php'; $sql_error = 'SQL Error : '; //-------------------------- $return = contact; if ($check != fail) { $reason = pass; sendmail("info@info.com","info@earhealth.gr","info.com","E-mail <BR><BR> <BR><BR>name : <B>$_POST[NAME]</B><BR>adress : <B>$_POST[ADRESS]</B><BR>tel: <B>$_POST[TEL]</B> <BR>E-mail. : <B>$_POST[EMAIL]</B><BR>message : <B>$_POST[COMMENTS]</B><BR>"); } ?> <html> <head> <meta http-equiv="Content-Language" content="el"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="JavaScript"> <!-- function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } //--> </script> </head> <body onLoad="MM_goToURL('parent','accept_contact.php');return document.MM_returnValue"> <p> </p> </body> </html> I guess it's not necessary to also post the 'accept_contact.php' file here. Any help is appreciated! Edited March 25, 2014 by member102 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.