Este comentario ha sido enviado desde www.basinger.com.ve
Comentario enviado por:
Nombre:
Correo Electronico:
Telefono:
Direccion:
Comentario:
pero fijense q esta en blanco... o sea llega vacio.. no envia los campos.. reviso y reviso y sigue lo mismo... alguien podria ayudarme en este caso????... aqui les dejo el codigo!!!
Código:
saludos y de antemano gracias!!!!! <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $para = "[email protected]"; $asunto = 'Basinger de Venezuela, C.A.'; //*** Aca el cuerpo del Mensaje $mensaje= "<html><head><title>Comentario de Contactenos</title></head><body><br><br> <font size=5 font=arial>Este comentario ha sido enviado desde www.basinger.com.ve <br><br>Comentario enviado por: </font><br><br>"; $mensaje = $mensaje."<br><br>Nombre: ".$nombre; $mensaje = $mensaje."<br><br>Correo Electronico: <a href='mailto:".$correo."'>". $correo ."</a>"; $mensaje = $mensaje."<br><br>Telefono: ".$telefono; $mensaje = $mensaje."<br><br>Direccion: ".$direccion; $mensaje = $mensaje."<br><br>Comentario: ".$comentario; $mensaje = $mensaje."<br><br></body></html>"; //*************************************************************** $cabeceras = 'From:'. $correo . "\r\n"; $cabeceras .= 'Reply-To: [email protected]' . "\r\n"; $cabeceras .= "Content-type: text/html; charset=iso-8859-1\n"; mail($para, $asunto, $mensaje, $cabeceras); //*********************************************************************** $insertGoTo = "final.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Documento sin título</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../css/estilo.css" rel="stylesheet" type="text/css"> <script language="JavaScript" 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_validateForm.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> <link href="css/ccs-txt.css" rel="stylesheet" type="text/css"> <link href="css/estilo.css" rel="stylesheet" type="text/css"> <link href="estilos.css" rel="stylesheet" type="text/css"> </head> <body> <form action="form.php" method="post" name="form1" onSubmit="MM_validateForm('nombre','','R','correo','','RisEmail','telefono','','NisNum');return document.MM_returnValue"> <table align="center"> <tr valign="baseline"> <td align="right" nowrap class="verdana_once">*Nombre:</td> <td width="170" class="verdana_once"><input name="nombre" type="text" id="nombre" style="font-family: Verdana; color: #7a7864; font-size: 8pt; font-weight: regular; border: 1px solid #94906D" onBlur="MM_validateForm('nombre','','R');return document.MM_returnValue" value="" size="34"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="verdana_once">*E-Mail:</td> <td class="verdana_once"><input name="correo" type="text" style="font-family: Verdana; color: #7a7864; font-size: 8pt; font-weight: regular; border: 1px solid #94906D" onBlur="MM_validateForm('nombre','','RisEmail');return document.MM_returnValue" value="" size="34"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="verdana_once">Teléfono:</td> <td class="verdana_once"><input type="text" name="telefono" value="" size="34" style="font-family: Verdana; color: #7a7864; font-size: 8pt; font-weight: regular; border: 1px solid #94906D"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="verdana_once">Empresa: </td> <td class="verdana_once"><input type="text" name="direccion" value="" size="34" style="font-family: Verdana; color: #7a7864; font-size: 8pt; font-weight: regular; border: 1px solid #94906D"></td> </tr> <tr valign="baseline"> <td align="right" valign="top" nowrap class="verdana_once">*Comentarios</td> <td class="verdana_once"> <textarea name="comentario" cols="31" rows="5" style="font-family: Verdana; color: #7a7864; font-size: 8pt; font-weight: regular; border: 1px solid #94906D"></textarea> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td class="verdana_once"><div align="right"> <input type="submit" class="verdana11" style="font-family: Verdana; color: #7a7864; font-size: 8pt; font-weight: bold; border: 1px solid #7a7864" value="Enviar"> </div></td> </tr> </table> <p class="texto-normal"> <input type="hidden" name="MM_insert" value="form1"> </p> </form> </body> </html>