I am new in symfony. i want to create page of user registration and i want to create user name unique but i don't know how to get posted values of form. i tried $request->getParameter('name'); function but i didn't get any value so please tell me how can i get posted values of form and how can i create user name field unique?

Symfony renders form field names using this taplate:formName[fieldname]It means that when you post your form, you get the form values in an array under the formName key.So in order to get you form values you must do something like this:

The $parameters variable will hold an array of your form field values.

If you want your username to be unique, thirst thing you must do is to add unique constraint to your databse username field. It will ensure, that there will be no duplicates in your database. And when you get a username from posted form, you must query your database for that user, and if you find one in the database output an error messeage to your registration page.If you will have trouble of doing that, post your question here.