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

2010-07-02 Thread Carlos Sura
Hello, this function does not work for me... And I really don't know what am I doing wrong... Any help?? This function is in a class, and I call it in a form, to create a new user.. $objEmploye=new Employe; if ( $objEmploye->insert(array($name,$lastname,$salary,$dui,$afp,$isss,$nit)

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

2010-07-02 Thread Ashley Sheridan
On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrote: > > Hello, this function does not work for me... And I really don't know what am > I doing wrong... Any help?? > > This function is in a class, and I call it in a form, to create a new user.. > > > > $objEmploye=new Employe; > if

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

2010-07-02 Thread Carlos Sura
ing me. Carlos Sura. Subject: Re: [PHP] What's wrong in this function? Does not work for me. From: a...@ashleysheridan.co.uk To: carlos_s...@hotmail.com CC: php-general@lists.php.net Date: Sat, 3 Jul 2010 00:08:05 +0100 On Fri, 2010-07-02 at 22:05 +, Carlos Sura wrot

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

2010-07-02 Thread Ashley Sheridan
. Do you want my form code? all the > entire class.php code?? > > Thank you for helping me. > > Carlos Sura. > > > > > > > Subject: Re: [PHP] What's wrong in this function? Does not work for me. > From: a...@ashleysheridan.co.uk > To: carlos

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

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

2010-07-03 Thread Hans Åhlin
in database when I fill them up in the >> form... But, I really don't know why... Do you want my form code? all the >> entire class.php code?? >> >> Thank you for helping me. >> >> Carlos Sura. >> >> >> >> >> >> >>

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 Ashley Sheridan
Ash, > >> > >> No, I don't get an error message, the thing is, my post form, isn't > >> working... I can't post those fields in database when I fill them up in > >> the form... But, I really don't know why... Do you want my form code? all >

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] 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{ >