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

Joan Olivé M. jolive at tinet.org
Tue Apr 5 15:20:13 CDT 2005


Good Afternoon,

>From your message I think to undesrtand must change the .php syntax in:

<?php

foreach($HTTP_GET_VARS as $caca);   <<-- Here: $HTTP_POST_VARS -->>
$vars=explode(",","nom,empresa,telf,fax,mail,adreca,pob,cp,consulta,file,uni
dades,tintasaprimera,tintasdorso,personalizacion,foto,banda,codifbanda,codig
obarras,panelfirmas,");
foreach($vars as $v)
{
 if ($HTTP_GET_VARS[$v]!=""){$$v=$HTTP_GET_VARS[$v];}   <<-- and here:
HTTP_POST_VARS -->>
}


  $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");


?>

any more changes ? Thanks again
Joan Olivé M.
from Catalonia
----- Original Message -----
From: "Ken Robinson" <kenrbnsn at rbnsn.com>
To: <thelist at lists.evolt.org>
Sent: Tuesday, April 05, 2005 9:32 PM
Subject: Re: [thelist] I promise learning some PHP, in the future...


Quoting "Joan Olivé M." <jolive at tinet.org>:

> Well, Rob, It's resisting to work...
>
> Thanks a lot in any case. I've the change, but it doesn't work.
>
> I realize that you have done a proof, when the form worked with "get", the
> file received was:
>

[snip]

>
>> Joan
>>
>> Try:
>> <form action="enviar.php" method="POST" enctype="multipart/form-data">
>>
>> When you have <input type="file"> you must use method="POST".
>>

When you switch from using method="get" to method="post", you have to change
your input array from $_GET to $_POST

Kem

--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list