[thelist] darkness is still winning to light... <Was PHP missfunction on loading a file from a HTML FORM>
Joan Olivé M.
jolive at tinet.org
Wed Apr 6 05:26:10 CDT 2005
Dear freinds,
It's still without working.
I've tried changing the method _GET for _POST, but I'm affraid something was wrong.
The form is in: http://www.bbcard.org/prova-05-04-05/bbcard-presupuesto.htm
The form main code is: <form action="enviar.php" method="POST" enctype="multipart/form-data">
<INPUT NAME="succes" TYPE="hidden" VALUE="gracias.htm"> </FORM>
The PHP code used now is:
<?php
foreach($HTTP_POST_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_POST_VARS[$v]!=""){$$v=$HTTP_POST_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");
?>
and now, when testing the form, everithing works but de "loading file" option. The message received is:
<<
Nom: xxx
Empresa: xxx
Telèfon: xxx
Fax:
Email: info at alef.cc
Adreça:
Població:
Codi postal:
Consulta:
Fitxer adjunt: /tmp/phpRFPEyr >>
Any help, please ?
Or even, could any from you giving me an exemple for FORM+PHP like this, that I could copy, but INCLUDING THE "FORM FILE SENDING" capability ?
Thanks again, from Catalonia
More information about the thelist
mailing list