Skip to content
Snippets Groups Projects
Commit acb69ee4 authored by Matthieu Guffroy's avatar Matthieu Guffroy
Browse files

Form: call insert or update

parent 29f2c126
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,13 @@ class Form {
}
// If all validators ok, commit
if($success) {
if($this->action == "Modifier") {
$this->object->update();
} else {
$this->object->insert();
}
}
} else {
$post = false;
}
......
......@@ -51,7 +51,7 @@ class Objet
return $ret;
}
public static function insertAll()
public static function insert()
{
$className = get_called_class();
$dbName = lcfirst($className);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment