Hola, consulto con ustedes los expertos. Tengo un sitio hecho en html. Tengo hosting en Godaddy, y me cambiaron de plan, según entiendo mi plan tenía solo version php5, y ahora tengo php5.4 Entonces asumo que esto, causó que mi formulario de contacto ya no funcione, y en verdad no sí algo en el código se puede modificar, o si esto no tiene ninguna relación, ya que antes si me funcionaba. O si debo buscar otro formulario, y si fuera así, agradecería me pasaran un link de donde obtenerlo.
codigo html:
Código HTML:
<h3 class="blanco">Contáctanos</h3>
<form id="form1" name="form1" method="post" action="enviar_form.php">
<p> </p>
<p>Si deseas mayor información de algunos de nuestros servicios, con gusto nos pondremos en contacto.</p>
<p>
<label for="nombre">Nombre</label>
<input name="nombre" type="text" id="nombre" size="30" />
</p>
<p>
<label for="empresa">Empresa</label>
<input name="empresa" type="text" id="empresa" size="30" />
</p>
<p>
<label for="email">Email</label>
<input name="email" type="text" id="email" size="30" />
</p>
<p>
<label for="telefono">Telefono</label>
<input name="telefono" type="text" id="telefono" size="30" />
</p>
<p>
<label for="mensaje">Mensaje</label>
<textarea name="mensaje" id="mensaje" cols="45" rows="5"></textarea>
</p>
<p>
<input type="submit" name="button" id="button" value="Enviar" />
</p>
</form>
el codigo de php para capturar datos:
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<?php
$nombre = $_POST['nombre'];
$email = $_POST['email'];
$empresa = $_POST['empresa'];
$telefono = $_POST['telefono'];
$header = 'From: ' . $email . " \r\n";
$header .= "X-Mailer: PHP/" . phpversion() . " \r\n";
$header .= "Mime-Version: 1.0 \r\n";
$header .= "Content-Type: text/plain";
$mensaje = "Este mensaje fue enviado por " . $nombre . ", de la empresa " . $empresa . " \r\n";
$mensaje .= "Su e-mail es: " . $email . " \r\n";
$mensaje .= "Su telefono es: " . $telefono . " \r\n";
$mensaje .= "Mensaje: " . $_POST['mensaje'] . " \r\n";
$mensaje .= "Enviado el " . date('d/m/Y', time());
$para = '[email protected]';
$asunto = 'Contacto desde Pagina';
mail($para, $asunto, utf8_decode($mensaje), $header);
?>
<script>
var targetURL="http://www.misitio.com/gracias.html"
window.location=targetURL
</script>
</body>
</html>
Gracias por cualquier ayuda,