Comunidad de diseño web y desarrollo en internet online

su comentario no ha sido enviado formtomail

Citar            
MensajeEscrito el 22 Jul 2008 04:22 pm
Hola a todos ,soy nuevo en el foro..soy asiduo lector del sitio y esta vez vengo en busca de ayuda
Tengo un sitio web http://www.planetahostel.com/
el cual tiene una pagina de contactos y otra de reservas,
funcionaban perfecto pero hace mas de 2 meses ,dejo de hacerlo ,,me dice que los campos estan en blanco
pongo el codigo para ver si me pueden ayudar

Código :

<!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=ISO-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
   background-color: #999966;
   margin-left: 0px;
   margin-top: 0px;
   margin-right: 0px;
   margin-bottom: 0px;
}
.style2 {font-size: 13px;
   font-family: Arial, Helvetica, sans-serif;
   color: #000000;
}
.style5 {
   font-family: Arial, Helvetica, sans-serif;
   font-size: 10px;
}
a {
   font-size: 10px;
   color: #666666;
   font-family: Arial, Helvetica, sans-serif;
}
a:visited {
   color: #666666;
   text-decoration: none;
}
a:hover {
   color: #000000;
   text-decoration: none;
}
a:active {
   color: #666666;
   text-decoration: none;
}
a:link {
   text-decoration: none;
}
.style6 {color: #666666}
.style58 {   font-family: Arial, Helvetica, sans-serif;
   font-size: 11px;
}
.style62 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; }
.style63 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.style64 {   color: #FFFFFF;
   font-weight: bold;
}
.style65 {   color: #000000;
   font-weight: bold;
   font-family: Arial, Helvetica, sans-serif;
   font-size: 12px;
}
.style15 {font-size: 16px}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('img/under/camio_up.jpg','img/under/mtb_up.jpg','img/under/mtb_en_up.jpg','img/under/fotos_up.jpg','img/under/pinito_dw.jpg','img/under/links_up.jpg')">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><table width="100%" height="480" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="300"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <tr>
            <td width="200" valign="top"><table width="100%" height="298" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF9900">
                <tr>
                  <td height="250" align="center" valign="middle" background="img/reserv_tit.jpg"><table width="90%" height="250" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="left" valign="bottom"><p class="style65">&nbsp;</p>
                            <p class="style63"><span class="style64"><span class="style15">1</span>-</span> <strong>Llen&aacute;</strong> el formulario con tus datos. </p>
                          <p class="style63"><span class="style64"><span class="style15">2</span>-</span> <strong>Revisa</strong> que no te hayas equivocado. (sobretodo con el &quot;email&quot; sino, no  vamos a poder contactarte).</p>
                          <p class="style63"><span class="style64"><span class="style15">3</span>-</span><strong>Volv&eacute;</strong> a revisarlo (por las dudas).<br />
                                <br />
                                <br />
                          </p></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td align="center" valign="top"><table width="90%" height="48" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="left" valign="top"><span class="style63"><span class="style64"><span class="style15">4</span>-</span> <strong>Listo</strong> el pollo! dale click a enviar.. </span></td>
                      </tr>
                  </table></td>
                </tr>
            </table></td>
            <td width="20">&nbsp;</td>
            <td width="550" align="left" valign="top" background="img/fondo_home.jpg"><table width="500" height="280" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="left" valign="top"><form id="form1" name="form1" method="post" action="formtomail.php">
                      <p><span class="style58">Nombre</span>
                          <input name="nombre" type="text" id="nombre" />
                          <span class="style58">Email</span>
                          <input name="email" type="text" id="email" size="20" />
                      </p>
                    <p><span class="style58">Tel. </span>
                          <input name="tel" type="text" id="tel" size="20" />
                          <span class="style58">Direcci&oacute;n</span>
                          <input name="dir" type="text" id="dir" />
                      </p>
                    <p><span class="style58">Ciudad</span>
                          <input name="ciudad" type="text" id="ciudad" size="15" />
                          <span class="style58">Pais</span>
                          <select name="pais" id="pais">
                            <option value="pais" selected="selected"> elige tu pa&iacute;s </option>
                            <option value="999"> -Other- [--]</option>
                            <option value="5"> Afghanistan [af]</option>
                            <option value="14"> American Samoa [as]</option>
                            <option value="7"> Anguilla [ai]</option>
                            <option value="13"> Argentina [ar]</option>
                            <option value="16"> Australia [au]</option>
                            <option value="15"> Austria [at]</option>
                            <option value="22"> Belgium [be]</option>
                            <option value="31"> Brazil [br]</option>
                            <option value="38"> Canada [ca]</option>
                            <option value="45"> Chile [cl]</option>
                            <option value="47"> China [cn]</option>
                            <option value="49"> Costa Rica [cr]</option>
                            <option value="57"> Denmark [dk]</option>
                            <option value="59"> Dominican [do]</option>
                            <option value="62"> Estonia [ee]</option>
                            <option value="68"> Finland [fi]</option>
                            <option value="73"> France [fr]</option>
                            <option value="55"> Germany [de]</option>
                            <option value="87"> Greece [gr]</option>
                            <option value="93"> Hong Kong [hk]</option>
                            <option value="98"> Hungary [hu]</option>
                            <option value="106"> Iceland [is]</option>
                            <option value="102"> India [in]</option>
                            <option value="99"> Indonesia [id]</option>
                            <option value="100"> Ireland [ie]</option>
                            <option value="101"> Israel [il]</option>
                            <option value="107"> Italy [it]</option>
                            <option value="108"> Jamaica [jm]</option>
                            <option value="110"> Japan [jp]</option>
                            <option value="117"> Korea, North [kp]</option>
                            <option value="118"> Korea, South [kr]</option>
                            <option value="130"> Luxembourg [lu]</option>
                            <option value="142"> Macau [mo]</option>
                            <option value="152"> Malaysia [my]</option>
                            <option value="151"> Mexico [mx]</option>
                            <option value="160"> Netherlands [nl]</option>
                            <option value="10"> Netherlands (an) [an]</option>
                            <option value="165"> New Zealand [nz]</option>
                            <option value="161"> Norway [no]</option>
                            <option value="171"> Philippines [ph]</option>
                            <option value="173"> Poland [pl]</option>
                            <option value="177"> Portugal [pt]</option>
                            <option value="183"> Russia [ru]</option>
                            <option value="190"> Singapore [sg]</option>
                            <option value="238"> South Africa [za]</option>
                            <option value="66"> Spain [es]</option>
                            <option value="189"> Sweden [se]</option>
                            <option value="42"> Switzerland [ch]</option>
                            <option value="218"> Taiwan [tw]</option>
                            <option value="215"> Turkey [tr]</option>
                            <option value="76"> United Kingdom [gb]</option>
                            <option value="223"> United States [us]</option>
                          </select>
                      </p>
                    <p class="style58"><strong>Fecha de llegada:</strong> dia
                      <input name="dia1" type="text" id="dia1" size="2" maxlength="2" />
                      mes
                      <select name="mes1" size="1" id="mes1">
                        <option value="enero" selected="selected">enero</option>
                        <option value="febrero">febrero</option>
                        <option value="marzo">marzo</option>
                        <option value="abril">abril</option>
                        <option value="mayo">mayo</option>
                        <option value="junio">junio</option>
                        <option value="julio">julio</option>
                        <option value="agosto">agosto</option>
                        <option value="septiembre">septiembre</option>
                        <option value="octubre">octubre</option>
                        <option value="noviembre">noviembre</option>
                        <option value="diciembre">diciembre</option>
                      </select>
                      a&ntilde;o
                      <input name="ano1" type="text" id="ano1" size="4" maxlength="4" />
                      <br />
                      <br />
                      <strong>Fecha de salida:</strong> dia
                      <input name="dia2" type="text" id="dia2" size="2" maxlength="2" />
                      mes
                      <select name="mes2" size="1" id="mes2">
                        <option value="enero" selected="selected">enero</option>
                        <option value="febrero">febrero</option>
                        <option value="marzo">marzo</option>
                        <option value="abril">abril</option>
                        <option value="mayo">mayo</option>
                        <option value="junio">junio</option>
                        <option value="julio">julio</option>
                        <option value="agosto">agosto</option>
                        <option value="septiembre">septiembre</option>
                        <option value="octubre">octubre</option>
                        <option value="noviembre">noviembre</option>
                        <option value="diciembre">diciembre</option>
                      </select>
                      a&ntilde;o
                      <input name="ano2" type="text" id="ano2" size="4" maxlength="4" />
                      </p>
                    <p><span class="style62">N&uacute;mero de personas</span>
                          <input name="personas" type="text" id="personas" size="2" maxlength="2" />
                          <span class="style58"><strong>Tipo de reserva:</strong> Hab. Cuadruple</span>
                          <input name="hab4" type="checkbox" id="hab4" value="checkbox" />
                          <span class="style58">Hab.Doble</span>
                          <input name="hab2" type="checkbox" id="hab2" value="checkbox" />
                      </p>
                    <input type="hidden" name="redirect" value="http://www.planetahostel.com/gracias2.html" />
                      <input type="hidden" name="recipient" value="[email protected]" />
                      <input type="hidden" name="soggetto" value="reserva de planetahostel.com" />
                      <input type="hidden" name="ip" value="" />
                      <input type="hidden" name="requested" value="nombre,email,tel,dir,ciudad,pais,dia1,mes1,ano1,dia2,mes2,ano2,personas"/>
                      <input name="submit" type="submit" style="font-family: arial; font-size: 6 pt" value="Enviar" />
                      <input type="reset" value="Cancelar" name="Cancella" style="font-family: arial; font-size: 6 pt" />
                  </form></td>
                </tr>
            </table></td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="middle"><table width="715" height="120" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="15" height="90">&nbsp;</td>
            <td width="140" align="center" valign="bottom"><a href="como_llegar_es.html" target="mainFrame" onmouseover="MM_swapImage('Image10','','img/under/camio_up.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="img/under/camio_dw.jpg" name="Image10" width="120" height="82" border="0" id="Image10" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','img/under/camio_dw.jpg',1)"></a></td>
            <td width="140" align="center" valign="bottom"><a href="que_hacer_es.html" target="mainFrame" onmouseover="MM_swapImage('Image9','','img/under/mtb_up.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="img/under/mtb_dw.jpg" name="Image9" width="120" height="82" border="0" id="Image9" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','img/under/mtb_en_up.jpg',1)"></a></td>
            <td width="140" align="center" valign="bottom"><a href="photos.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','img/under/fotos_up.jpg',1)"><img src="img/under/fotos_dw.jpg" name="Image11" width="120" height="82" border="0" id="Image11" /></a></td>
            <td width="140" align="center" valign="bottom"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','img/under/pinito_dw.jpg',1)"><img src="img/under/pinito_up.jpg" name="Image12" width="120" height="85" border="0" id="Image12" /></a></td>
            <td width="140" align="center" valign="bottom"><a href="links_es.html" target="mainFrame" onmouseover="MM_swapImage('Image15','','img/under/links_up.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="img/under/links_dw.jpg" name="Image15" width="120" height="80" border="0" id="Image15" /></a></td>
          </tr>
          <tr>
            <td height="30" colspan="6" align="center" valign="bottom" class="style2 style5"><span class="style6">Av.Alvear 2833, esq. Pasaje Alem&aacute;n | Esquel, Chubut, Argentina (9200) | t.+54 2945 456845</span> | <a href="mailto:[email protected]" target="_blank">[email protected]</a></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>



formtomail

Código :

<?


$from="From: MyFormMail<[email protected]>";

$richiesti=explode(",",$requested);
$nascosti=array("recipient","soggetto","requested","redirect","ip");
$count=count($richiesti);

for($i=0;$i<$count;$i++)
{
  $a=$richiesti[$i];
  if(trim($HTTP_POST_VARS[$a])=="")
  {
    $mess.="El campo <b>$a</b>esta vacio<br>";
  }
}
   
if($mess) :
echo "<table><tr><td style=\"font-family:verdana;font-size:10 pt\">
<b>Uups!!!...tus comentarios no se han enviado por el siguiente errores:</b><br><br>$mess
</td></tr></table>";
else :

while(list($nome,$value)=each($HTTP_POST_VARS))
{
 $campi[]=$nome;
 if(!in_array($nome, $nascosti))
 {
   $body.= "$nome: $value\n";
 }
}

$head="Modulo proveniente del sitio $HTTP_HOST\n\n\n";
$giorno=date("d/m/y");
$ora=date("H:i:s");
$foot="\n\nModulo enviado el $dia a las $ora";

 if (in_array ("ip", $campi))
  {
    $foot.=" del'IP $REMOTE_ADDR";
  }

$contenuto=$head.$body.$foot;
mail($recipient,$soggetto,$contenuto, $from);
if($redirect) :
header("Location: $redirect");
else :
echo "Tu correo se envi� correctamente, te contestaremos pronto, Gracias!";
endif;

endif;

?>

Por eltiokuaker

1 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 22 Jul 2008 05:56 pm

Rizome diría: escribió:

Resume tu código, coloca solo la parte del error o al menos explica puntualmente tu situación...

Por mauril26

161 de clabLevel



 

opera
Citar            
MensajeEscrito el 22 Jul 2008 06:05 pm
si supiera donde esta el error.....xd!! lo que hace este formulario es decirme que lo que envio por mas que escriba,esta en blanco

Por eltiokuaker

1 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 28 Jul 2008 04:08 pm
Me gustaria poder recibir ayuda
Muchas gracias :D

Por eltiokuaker

1 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 28 Jul 2008 04:15 pm
Elimina esta linea, por que ahi esta el error.-

Código :

for($i=0;$i<$count;$i++)
{
$a=$richiesti[$i];
if(trim($HTTP_POST_VARS[$a])=="")
{
$mess.="El campo <b>$a</b>esta vacio<br>";
}
}

Por york3rs

Claber

561 de clabLevel

1 tutorial

Genero:Masculino  

LA___Chile

msie7
Citar            
MensajeEscrito el 28 Jul 2008 04:45 pm
Bueno ya encontre tu error, ahora tienes Global_OF
Por ello donde decia:

Código :

$richiesti=explode(",",$requested);


debes ponder

Código :

$richiesti=explode(",",$_Get['requested']);

Por york3rs

Claber

561 de clabLevel

1 tutorial

Genero:Masculino  

LA___Chile

msie7
Citar            
MensajeEscrito el 28 Jul 2008 05:45 pm
si sabes php podras cambiar esto $HTTP_POST_VARS por esto $_POST['nombrevariable'] ya q si han realizado algun cambio en tu server digamos una actualizacion del php o un reset global no podras usar $HTTP_POST_VARS por seguridad estas estan desactivadas y solo podras usar $_POST de todos modos prueba y nos comentas como te fue

Por talcual

686 de clabLevel



 

Colombia

msie7

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.