Re: [PHP]

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 18:58 +0100, te0t3l wrote: > Hi, I have a photo gallery and I update it with a XML file like this: > > $NuevaCol = new SimpleXMLElement("../xml/" . $coleccionXML . '.xml', null, > true); > $first = $NuevaCol->addChild('coleccion'); > $attsNuevaCol = $first->addAttribute('nom

[PHP]

2010-07-03 Thread te0t3l
Hi, I have a photo gallery and I update it with a XML file like this: $NuevaCol = new SimpleXMLElement("../xml/" . $coleccionXML . '.xml', null, true); $first = $NuevaCol->addChild('coleccion'); $attsNuevaCol = $first->addAttribute('nombre_col', utf8_encode($titNuevaColEspacios)); $attsNuevaCol =

[PHP] Static Methods and System Resources

2010-07-03 Thread Daniel Kolbo
Hello, Does PHP 'reinclude' static methods with each new instantiation of a class that has static methods? That is, if i have 100 objects is the static method sitting in memory 1 time or 100 times? Thanks, dK ` -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 16:11 +0200, Hans Åhlin wrote: > Another thing is that I would use != false, so every value but false passes. > > $objEmploye=new Employe; >if ( > $objEmploye->insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) > == true){ >echo 'Saved'; >}else{ >

Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Hans Åhlin
Another thing is that I would use != false, so every value but false passes. $objEmploye=new Employe; if ( $objEmploye->insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)) == true){ echo 'Saved'; }else{ echo 'Error, try again'; } ***

Re: [PHP] Re: how to use HTML Symbol Entities with mail() ?

2010-07-03 Thread Ashley Sheridan
On Fri, 2010-07-02 at 22:58 -0300, Manuel Lemos wrote: > Hello, > > on 07/01/2010 10:34 AM cr.vege...@gmail.com said the following: > > Hi List, > > > > I am working on generated emails, using the mail() function. > > Works fine, but when including characters like ∧ (= ∧) or ∨ > > (= ∨) > > in

Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 09:20 +0200, Hans Åhlin wrote: > You have forgotten the ending ; in the sql query > try this > mysql_query("INSERT INTO employes (name,lastname, salary, id, afp, > isss, nit) VALUES ('".$field[0]."', > '".$field[1]."','".$field[2]."','".$field[3]."','".$field[4]."','".$fi

Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Ashley Sheridan
On Sat, 2010-07-03 at 09:01 +0200, Alexandre Simon wrote: > Hello, > > multiple things: > - escape your values: > 1. if some of the user input contains '\'' for instance, your query is > not well formed > 2. if some evil user want to do anything with your DB, he can do it > => See mysql_esc

Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Hans Åhlin
You have forgotten the ending ; in the sql query try this mysql_query("INSERT INTO employes (name,lastname, salary, id, afp, isss, nit) VALUES ('".$field[0]."', '".$field[1]."','".$field[2]."','".$field[3]."','".$field[4]."','".$field[5]."','".$field[6]."');");

Re: [PHP] What's wrong in this function? Does not work for me.

2010-07-03 Thread Alexandre Simon
Hello, multiple things: - escape your values: 1. if some of the user input contains '\'' for instance, your query is not well formed 2. if some evil user want to do anything with your DB, he can do it => See mysql_escape_string or PDO prepared statements - Use "else" part of the if statement