Mil gracias, voy a empezar con lo que me enviaste a trabajar. Luego les cuento.
Gracias!!!
estuve buscando el php.ini en el hosting y no lo encuentro, puede ser que no exista? lo tengo que crear? cómo se hace?
Cuando me comunico con el hosting donde se aloja lo único que me saben decir es cuál es la cuenta a donde la puede enviar y el host que debo utilizar.
El formulario me llega vacío y con un remitente que dice Apache. Alguien me puede ayudar?
Aunque no lo crean sigo con este problema y ahora me sucede con otro servidor. Así que si no les molesta paso a comentarles algunas cosas.
Según los comentario decidí sacarle el ini_set y los errores que me envía son los siguientes:
Notice: Undefined variable: email in C:\Inetpub\ftproot\midominio\sendform.php on line 9
Notice: Undefined variable: asunto in C:\Inetpub\ftproot\midominio\sendform.php on line 18
Notice: Undefined variable: nota in C:\Inetpub\ftproot\midominiosendform.php on line 21
Notice: Undefined variable: nombre in C:\Inetpub\ftproot\midominio\sendform.php on line 25
Notice: Undefined variable: email in C:\Inetpub\ftproot\midominio\sendform.php on line 25
Notice: Undefined variable: domicilio in C:\Inetpub\ftproot\midominio\sendform.php on line 26
Notice: Undefined variable: tel_particular in C:\Inetpub\ftproot\midominio\sendform.php on line 27
Notice: Undefined variable: tel_celular in C:\Inetpub\ftproot\midominio\sendform.php on line 28
Notice: Undefined variable: ipi in C:\Inetpub\ftproot\midominio\sendform.php on line 35
Notice: Undefined variable: httpagenti in C:\Inetpub\ftproot\midominio\sendform.php on line 36
Notice: Undefined variable: httprefi in C:\Inetpub\ftproot\midominio\sendform.php on line 37
Notice: Undefined variable: email in C:\Inetpub\ftproot\midominio\sendform.php on line 41
Los script que utilizo son 3: formulario.php; sendform.php; respuesta_ok.php.
Tengan en cuanto que borré algunas cosas pensando que podrían estorbar, pero al verdad más allá de lo estético quiero primero que funcione, después veré lo otro.
formulario.php
Código PHP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Formulario</title>
</head>
<body>
<form method="post" action="sendform.php">
Nombre / Name<br>
<input name="nombre" type="text" class="texto" id="nombre" size="36"><br>
<b><font face="Tahoma" size="2"> Correo / E-Mail:</font></b><br>
<br>
<font face="Tahoma" size="2"><b>Mensaje / Menssaje:</b></font><br>
<textarea name="nota" cols="29" rows="8" class="texto" id="mensaje"></textarea><br>
<input name="Submit" type="submit" class="texto" onClick="MM_validateForm('nombre','','R','email','','RisEmail','nota','','R');return document.MM_returnValue" value="Send">
</div>
sendform.php
Código PHP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Formulario</title>
</head>
<body background="fondo2.gif">
<?php
if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
{
echo "\n";
$badinput = "<h3>Su direccion electronica no es valida o esta mal escrita, reingresela por favor.\n";
echo $badinput;
}
$todayis = date("l, F j, Y, g:i a") ;
$asunto = $asunto ;
$subject = $asunto;
$nota = stripcslashes($nota);
$message = " $todayis [EST] \n
- ASUNTO: $asunto \n
- ESCRIBE: $nombre ($email)\n
- DOMICILIO: $domicilio\n
- TELEFONO PARTICULAR: $tel_particular\n
- TELEFONO CELULAR: $tel_celular\n
- TITULO DEL MENSAJE: $asunto\n
- MENSAJE:
$nota \n
------------------------------------------------------------------------------------------------------------------------------------\n
- INFORMACION ADICIONAL: IP = $ipi \n
- NAVEGADOR USADO: $httpagenti \n
- SE CONTACTO DESDE LA PAGINA: $httprefi \n
";
$from = "From: Formulario desde la web $email\r\n";
mail("[email protected]", $subject, $message, $from);
?>
<form method="post" action="sendform.php" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<p><font color="#FFFFFF" face="Arial">Confirmación de envÃ*o</font><p><br>
<b><font face="Tahoma" size="2"> <font color="#FFFFFF">Fecha:</strong><?php echo $todayis ?><strong>
<br />
Remitente:</strong><?php echo $nombre ?>( <?php echo $email ?> )<strong>
</strong></font></font>
<p align="center"><font face="Tahoma" size="2"><strong>
<font size="2" face="Tahoma" color="#000">Su Mensaje:<?php $notesout = str_replace("\r", "<br/>", $nota);echo $notesout; ?> </font>
</strong></font>
<p align="center"><font face="Tahoma" size="2">
<font size="2" face="Tahoma" color="#000">
<strong>
<br />
Su Direccion IP:<?php echo $ip ?> <br />
Referido desde:<?php echo $httpref ?> </font>
<p align="center"><a href="respuesta2.php" style="text-decoration: none">
<font color="#FFFFFF" face="Tahoma" size="2">[CONFIRMAR]</font></a></td>
<td height="20" width="71" align="center">
</td>
<td height="20" width="70" align="center">
</td>
</tr>
<tr>
<td height="20" width="203"> </td>
<td height="20" width="28"> </td>
<td height="20" width="5"> </td>
<td height="20" width="194"> </td>
<td height="20" width="5"> </td>
<td height="20" width="194" colspan="2"> </td>
<td height="20" valign="bottom" width="140">
<img border="0" src="DA.gif" width="167" height="26"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
respuesta_ok.php
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Env? de Formulario</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body background="bg_b.gif">
<?php
if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
{
echo "<h3></h3>\n";
$badinput = "<h3>Su direccion electronica no es valida o esta mal escrita, reingresela por favor.</h3>\n";
echo $badinput;
}
$todayis = date("l, F j, Y, g:i a") ;
$asunto = $asunto ;
$subject = $asunto;
$nota = stripcslashes($nota);
$message = " $todayis [EST] \n
- ASUNTO: $asunto \n
- ESCRIBE: $nombre ($email)\n
- MENSAJE:
$nota \n
------------------------------------------------------------------------------------------------------------------------------------\n
- INFORMACION ADICIONAL: IP = $ipi \n
- NAVEGADOR USADO: $httpagenti \n
- SE CONTACTO DESDE LA PAGINA: $httprefi \n
";
$from = "From: $email\r\n";
mail("[email protected]", $subject, $message, $from);
?>
<body bgcolor="#FFFFFF" topmargin="0" background="bg_b.gif">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="689" id="AutoNumber1" bgcolor="#4A7BB6" height="10">
<tr>
<td width="689" height="100%" colspan="5" bgcolor="#4A7BB6" valign="top">
<p align="left"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="780" HEIGHT="210" id="arriba" ALIGN="">
<PARAM NAME=movie VALUE="arriba.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="arriba.swf" quality=high bgcolor=#FFFFFF WIDTH="780" HEIGHT="210" NAME="arriba" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>
</td>
</tr>
<tr>
<td width="163" height="230" bgcolor="#91B9DC" style="border-style: none; border-width: medium">
<p class="MsoNormal" align="left" style="margin-left: 20; margin-right: 10">
</p>
<body background="fondoformulario.jpg">
</p>
<p align="center">
</td>
<td width="381" height="230" bgcolor="#91B9DC" style="border-style: none; border-width: medium" valign="top">
<p class="MsoNormal" align="left" style="margin-left: 20; margin-right: 10">
</p>
<p class="MsoNormal" align="left" style="margin-left: 20; margin-right: 10">
<font face="Wingdings 2" color="#FFFFFF" size="5">d</font><span lang="es"><font face="Tahoma" color="#FFFFFF" size="5"> </font>
<font face="Tahoma" color="#FFFFFF" size="4">Gracias por comunicarse con
nosotros</font></span></p>
</body></td>
<td width="4" height="230" bgcolor="#91B9DC" style="border-style: none; border-width: medium">
<p align="center">
</td>
<td width="81" height="230" bgcolor="#91B9DC" style="border-style: none; border-width: medium" background="guarda.gif">
</td>
<td width="151" height="230" bgcolor="#91B9DC" style="border-style: none; border-width: medium">
</td>
</tr>
<tr>
<td width="689" height="25" bgcolor="#4A7BB6" colspan="5">
<p align="center"><b><font face="Tahoma" size="2" color="#FFFFFF">::
<img border="0" src="ashleymini.gif" width="141" height="19"> ::
(011)15-6-8882276 ::</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>