RE: [PHP-DB] mail

2009-05-05 Thread Gautam Bhatia
hello, Yes you are right, the || operator stands for OR , which means , if any of those listed fields are empty, do not process the form and throw a error message instead. If you use && instead of || , it instruct the php other way around as in , if ($field == "" && $field1 == "") or otherfi

Re: [PHP-DB] mail

2009-05-05 Thread Chris
if($empresa == "" || $nombre == "" || $telefono == "" || $mail == "" || $asunto == "" || $mensaje == "") { I want to know somthing: this "||" operator is OR, and de logic in my code is: if one of variables is empty and the rest not send the mail, it isnt? Looks like it to me. If I want

RE: [PHP-DB] mail

2009-05-05 Thread Emiliano Boragina
Hi again, Thanks Chris for your quickly answer. I dont test it yet. I want to share with all you a very strange, for me, solution: "; $contenido .= "Empresa: ".$_POST["empresa"].""; $contenido .= "Nombre y Apellido: ".$_POST["nombre"].""; $contenido .= "Telefono: ".$_POST

Re: [PHP-DB] mail

2009-05-05 Thread Chris
Emiliano Boragina wrote: if(isset($_POST["empresa"]) && isset($_POST["nombre"]) && isset($_POST["telefono"]) && isset($_POST["mail"]) && isset($_POST["asunto"]) && isset($_POST["mensaje"]) ) { I test this code to send mail, but I am testing this printing $contenido. If nothing is ISSE

[PHP-DB] mail

2009-05-05 Thread Emiliano Boragina
"; $contenido .= "Empresa: ".$_POST["empresa"].""; $contenido .= "Nombre y Apellido: ".$_POST["nombre"].""; $contenido .= "Telefono: ".$_POST["telefono"].""; $contenido .= "E-mail: ".$_POST["mail"].""; $contenido .= "Asunto: ".$_POST["asunto"].""; $c