student details saved and display using function in views