Ver Mensaje Individual
  #12 (permalink)  
Antiguo 05/01/2012, 11:51
maikelyordan
 
Fecha de Ingreso: enero-2012
Mensajes: 31
Antigüedad: 12 años, 4 meses
Puntos: 3
Respuesta: Como hago esto? interesante!

editalo ;D te lo dejo a lo mejor te sirva en la ultima linea tienes que poner el hotmail :D


<?php
if (!isset($_POST['email'])) {
?>
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
<style type="text/css">
<!--
.Estilo1 {color: #000000}
.Estilo2 {color: #FF0000}
.Estilo3 {
color: #FF0000;
font-style: italic;
font-weight: bold;
}
body {
background-image: url(http://www.los40.com/img/fondo_menu.gif);
}
-->
</style>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
<label></label>
<label>
</label>
<label>
</label>
<div align="center" onfocus="MM_validateForm('nombre','','R');MM_valid ateForm('email','','RisEmail');MM_validateForm('me nsaje','','R');return document.MM_returnValue">
<table width="250" height="445" border="1" bordercolor="#000000" background="http://mariachimexishow.com/ima/fondo_formulario_azul.png" bgcolor="#00FF00">
<tr>
<th width="79" scope="row"><span class="Estilo2">Nombre * </span></th>
<td width="155"><div align="center">
<input name="nombre" type="text" />
</div></td>
</tr>
<tr>
<th scope="row"><span class="Estilo2">Correo Electronico * </span></th>
<td><div align="center">
<input name="email" type="text" />
</div></td>
</tr>
<tr>
<th height="51" scope="row"><span class="Estilo2">Imagen</span></th>
<td><div align="center">
<select name="sexo" id="sexo">
<option value="0" selected>Seleccione</option>
<option>Masculino</option>
<option>Femenino</option>
<option>Gay (Forever Jejeje)</option>
</select>
</div></td>
</tr>
<tr>
<th scope="row"><span class="Estilo2">Mensaje * </span></th>
<th scope="row"><textarea name="mensaje" rows="10" cols="20"></textarea></th>
</tr>
<tr>
<th colspan="2" scope="row"><p>
<input name="submit" type="submit" value="Enviar" />
<input name="reset" type="reset" value="Borrar" />
</p>
<p class="Estilo3">Campos Marcados Con * SON OBLIGATORIOS!</p></th>
</tr>
</table>
<p>&nbsp;</p>
</div>
</form>
<?php
}else{
$mensaje="formulario de contacto en php";
$mensaje.= "\nNombre: ". $_POST['nombre'];
$mensaje.= "\nEmail: ".$_POST['email'];
$mensaje.= "\nSexo: \n".$_POST['sexo'];
$mensaje.= "\nMensaje: \n".$_POST['mensaje'];
$destino= "[email protected]";
$remitente = $_POST['email'];
$asunto = "Este Mensaje Fue Enviado Por: ".$_POST['nombre'];
mail($destino,$asunto,$mensaje,"FROM: $remitente");
?>
<p><strong>Tu Mensaje A Sido Enviado Gracias!</strong></p>
<?php
}
?>