我需要制作表格:
这是我已经完成的事情:
控制器:
public function UserAction(Request $request){
$form = $this->createForm(new UserIncType());
if ($request->isMethod('POST')) {
$form->bind($request);
if ($form->isValid()){
$valuePass=$form->get('Password')->getData();
$valueUser=$form->get('User')->getData();
$security_encoder = null;
$userRepo= $this->getDoctrine()->getRepository('MainCoreBundle:User');
$user = $userRepo->findById($valueUser);
$security_encoder = $this->get('security.encoder_factory')->getEncoder($user);
$password = $request->get('password');
}
return $this->redirect($this->generateUrl('permits_show'));
}
如何解码来自数据库的传递并使用表单传递来进行comapre?
或者还有其他方法吗?