What's wrong in this function? Does not work for me.
| From: | Carlos Sura | Date: | Fri, 02 Jul 2010 22:05:32 +0000 |
| Subject: | What's wrong in this function? Does not work for me. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-306653@lists.php.net to get a copy of this message | ||
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)) == true){
echo 'Saved';
}else{
echo 'Error, try again';
}
}else{
function insert($field){
if($this->con->connect()==true){
return 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]."')");
}
}
Thanks.
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now