[thelist] I promise learning some PHP, in the future...

Joan Olivé M. jolive at tinet.org
Tue Apr 5 12:22:46 CDT 2005


Good afternoon,

I promise all you learning some PHP in next future, but in the meanwhile I'm imposibilited to JOIN A FILE throug a form.

I imagine there should be a small syntaxis mistake that hides to my poor capacities in this program.

Thanks a lot in advance.
Joan Olivé M.
Catalonia

-  -  -  -  -

1) The page is: http://www.bbcard.org/prova-05-04-05/bbcard-presupuesto.htm


2) The code of "insertar fichero" is: <TR valign="top">
  <TD align="right" class="nom"><strong>Insertar un fichero :</strong>&nbsp;&nbsp;</TD>
  <TD colspan="3"><input name="file" type="file" class="quadre" id="file" size="64" maxlength="150"></TD>
</TR>

2) The main code of this form is:
<form action="enviar.php" method="get" enctype="multipart/form-data">
      <INPUT NAME="succes" TYPE="hidden" VALUE="gracias.htm">
</FORM>

3) The PHP code is: 

<?php

foreach($HTTP_GET_VARS as $caca);
$vars=explode(",","nom,empresa,telf,fax,mail,adreca,pob,cp,consulta,file,unidades,tintasaprimera,tintasdorso,personalizacion,foto,banda,codifbanda,codigobarras,panelfirmas,");
foreach($vars as $v)
{
 if ($HTTP_GET_VARS[$v]!=""){$$v=$HTTP_GET_VARS[$v];}
}


  $mailheaders = "From:info at alef.cc\n";
  $mailheaders .= "Reply-To:info at alef.cc\n";
  $mailheaders .= "Content-Type: text/html; charset=iso-8859-1\n";
  $subject="Formulari de contacte";
  $destino="info at alef.cc";

  $cuerpo1="Nom: $nom <br> Empresa: $empresa <br>  Telèfon: $telf <br> Fax: $fax <br> Email: $mail <br> Adreça: $adreca <br> Població: $pob <br> Codi postal: $cp <br> Consulta: $consulta <br> Fitxer adjunt: $file <br> Unitats: $unidades <br> Nr. tintes a primera cara: $tintasaprimera <br> Num de tintes al derrera: $tintasdorso <br> Personalització: $personalizacion <br> Fotografía digitalizada: $foto <br> Banda magnètica: $banda <br> Codificació de banda: $codifbanda <br> Código de barras: $codigobarras <br> Panel de signatures: $panelfirmas";

  mail($destino,$subject,$cuerpo1,$mailheaders);

  include("gracias.htm");


?>


More information about the thelist mailing list