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

Member Avatar for LastMitch

@lord_linus

what should I correct in it to run efficiently

I'm not sure if you find any solution yet.

In the future try to post the whole code instead a bit of code.

I also have symfony on my server and so far I got now idea how run your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.