Código :
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Mi código html es el siguiente:
Código HTML :
<div id="contact"> <div class="contact"> <h2>. . .<br /><br /> CONTACTATE CON NOSOTROS</h2> </div> <div class="container"> <div class="row"> <div class="col-md-6"> <div class="contact-form"> <form method="POST" id="contact-form" class="form-horizontal" action="contact-form.php" onSubmit="alert('Gracias por tu consulta! Nos comunicaremos contigo a la brevedad.');"> <div class="form-group"> <label class="col-lg-2 control-label">Nombre</label> <div class="col-lg-10"> <input class="form-control" type="text" name="name" required/> </div> </div> <div class="form-group"> <label class="col-lg-2 control-label">Email</label> <div class="col-lg-10"> <input class="form-control" name="email" type="text" required/> </div> <p><br> </p> </div> <div class="form-group"> <label class="col-lg-2 control-label">Tu pedido (recuerde incluir número de teléfono)</label> <div class="col-lg-10"> <textarea class="form-control" name="message" rows="10" maxlength="1024" required></textarea> </div> </div> <div class="form-group"> <div class="col-lg-offset-2 col-lg-10"> <button class="btn btn-default" type="reset" >Resetear</button> <input type="hidden" name="save" value="contact-form"> <button class="btn btn-success" id="submit" type="submit">Enviar</button> </div> </div> </form> </div>
Mi código PHP:
Código PHP :
<?php if (!isset($_POST["save"]) || $_POST["save"] != "contact-form") { header("Location: index.html#contact"); exit; } $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $email_content = "Name: $name\n"; $email_content = "Email: $email\n"; $email_content = "Message:\n\n$message"; mail ("[email protected]", "Nuevo pedido", $email_content); header("Location: index.html#contact"); exit; ?>
Alguien que sepa de alguna solución a mi problema? Le estaré muy agradecido
Un saludo grande.