How to set Ajax call and it will be stored inside PHP session variable?

I have input field and user simply filled this field. When there is full name it will be seen also at the same website page. This is friendly way to echo variable.