2012-02-09 17:03
浏览 19


I'm trying to make a application with Silex and I want to create a form wich will allow to add things in my database.

I added Symfony's components but I don't find documentation to create this kind of form, only connect forms. How can i do to use Symfony's components like :

$data = $form->getData();
return $app->redirect($app['url_generator']->generate('homepage'));

Or should I do something like that ?

$data = $form->getData();
$sql = "INSERT INTO  `testdb`.`video` (`id` ,`titre`)
VALUES (NULL ,  $data['name']";

Thanx for your help.

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题