Recently I am working on symfony. I have created a simple form and want to submit that form and send respons to user as email.
In index i have written as follow:
$product=new Product();
$product->setName('rohit');
$product->setPass('rohit');
$form=$this->createFormBuilder($product)
->add('name','text')
->add('pass','password')
->getForm();
$name='rohit';
return $this->render('EnsNewBundle:Email:ind.html.twig',
array('form'=>$form->createView(),'name'=>$name));
and when i submit this form then the following action should perfom:
i) it should print hello and ii) email process should be run in background.
I am trying to write as follow:
$client = new \Predis\Client();
$client->lpush('emailid','ucerturohit@gmail.com');
$u=$client->lrange('emailid',0,10);
//notification_on_signup($u);
var_dump($u);
return $this->render('EnsNewBundle:Email:header.html.twig');
what should I correct in it to run efficiently