< >

kontaktformular-lisa-email.php


Quell Code


<!DOCTYPE html>
<html>   
<head>

  <title>Kontakt</title>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
   

</head>
<body>
<main>
<div class="wrapper"> 
    <div class="content">
        <h1>Kontakt</h1>
        <p> 
        E-Mail: alnamla@gmx.de<br/>
        Telefon:
        </p>
    </div> 
    
    <section id="kontakt">
        <label for="name">Name:
            <input type="text" id="von" name="von" placeholder="Vor- und Nachname" required>
        </label><br/>
        <label for="mail">E-Mail:
            <input type="email" id="mail" name="mail" placeholder="Ihre E-Mail Adresse" required>
        </label><br/>
        <label for="betreff">Betreff:
            <input type="text" id="betreff" name="betreff" required>
        </label><br/>
        <label for="text">Nachricht:
            <textarea rows="20" cols="50" id="nachricht" name="nachricht" placeholder="Ihre Nachricht..." required></textarea>
        </label><br/>
            <input id="submit" type="button" value="Senden">
        
    </section>
    <div id="response"></div>
    
</div>   
</main>   
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" ></script>
  <script>
        $(document).ready(function() {
            $("#submit").click(function(){
            alert()
               if($("#von").val() == "" ||  $("#mail").val() == "" || $("#betreff").val() == "" || $("#nachricht").val() == "") {
                    $("#response").html("Bitte fülle alle Felder aus!");    
               } else {
                   $("#submit").attr("disabled","disabled");
                   $("#response").html("Lädt...!");  
                   $.ajax({
                       type: "POST",
                       url: "lisaemailoho.php",
                       data: "von=" + $("#von").val() + "&mail=" + $("#mail").val() + "&betreff=" + $("#betreff").val() + "&nachricht=" + $("#nachricht").val(),
                       success: function(msg){
                       
                            $("#response").html(msg);
                       }
                       
                       
                   });
                   
               }
               return false;                      
                                 
            });
            
            
        });
    </script>
</body> 
</html>