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
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]."');");
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
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
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
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';
}
***
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{
>
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
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 =
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
10 matches
Mail list logo