html - submit button php form not working -


i've started coding, however, while working on contact form can't work :(...

the problem submit button, it's unclickable , nothing happens (= screen not changes) when try submit email myself using form.

this code:

<div class="col-sm-6"> <h4 class="font-alt">get in touch</h4> <br> <form id="contact-form" role="form" novalidate=""> <div class="form-group"> <label class="sr-only" for="cname">name</label> <input type="text" id="cname" class="form-control" name="cname"       placeholder="name*" required="" data-validation-required-message="please enter name."> <p class="help-block text-danger"></p> </div>  <div class="form-group"> <label class="sr-only" for="cemail">your email</label> <input type="email" id="cemail" name="cemail" class="form-control" placeholder="your e-mail*" required="" data-validation-required-message="please enter email address."> <p class="help-block text-danger"></p> </div>  <div class="form-group"> <textarea class="form-control" id="cmessage" name="cmessage" rows="7" placeholder="message*" required="" data-validation-required-message="please enter message."></textarea> <p class="help-block text-danger"></p> </div>  <div class="text-center"> <button type="submit" class="btn btn-block btn-round btn-d">submit</button> </div>  </form> <div id="contact-response" class="ajax-response font-alt"></div> </div> 

and php i'm working with:

<?php // mail settings $to = "info@liannesiemensma.com"; $subject = "contact form"; if (isset($_post["name"]) && isset($_post["email"]) && isset($_post["message"])) {  $content  = "name: "     . $_post["name"]    . "\r\n"; $content .= "email: "    . $_post["email"]   . "\r\n"; $content .= "message: "  . "\r\n" . $_post["message"];  if (mail($to, $subject, $content, $_post["email"])) {  $result = array( "message" => "thanks contacting me! best reply in timely manner.", "sendstatus" => 1 );  echo json_encode($result); } else {  $result = array( "message" => "sorry, wrong.", "sendstatus" => 0 );  echo json_encode($result); } } ?> 

what doing wrong?

actuly form submitting on same page add

<?php print_r($_get); ?> 

add @ first line , check


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -