Html/php email page/form -


i want use php , html create contact page users can send me message directly website email-account

the problem have that, doesn't send messages email-inbox(no errors on page)

here code:

html(no css style): index.html

<!doctype html > <html>  <head>     <title>contact us</title>      <meta http-equiv="content-type" content="text/html; charset=utf-8" />   </head>  <body>      <div id="page-wrap">            <div id="contact-area">             send message:             <form method="post" action="contactengine.php">                 <label for="name">name:</label>                 <input type="text" name="name" id="name" />                  <label for="city">city:</label>                 <input type="text" name="city" id="city" />                  <label for="email">email:</label>                 <input type="text" name="email" id="email" />                  <label for="message">message:</label><br />                 <textarea name="message" rows="20" cols="20" id="message"></textarea>                  <input type="submit" name="submit" value="submit" class="submit-button" />             </form>          </div>      </div>  </body>  </html> 

php: contactengine.php

<?php  $emailfrom = "jhondoe@domain.com";<-- not sure 1 $emailto = "myemail@domain.com"; $subject = "website message"; $name = trim(stripslashes($_post['name']));  $tel = trim(stripslashes($_post['tel']));  $email = trim(stripslashes($_post['email']));  $message = trim(stripslashes($_post['message']));   // validation $validationok=true; if (!$validationok) {   print "<meta http-equiv=\"refresh\" content=\"0;url=error.htm\">";   exit; }  // prepare email body text $body = ""; $body .= "name: "; $body .= $name; $body .= "\n"; $body .= "tel: "; $body .= $tel; $body .= "\n"; $body .= "email: "; $body .= $email; $body .= "\n"; $body .= "message: "; $body .= $message; $body .= "\n";  // send email  $success = mail($emailto, $subject, $body, "from: <$emailfrom>");   ?> 


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -