Ratings not saving

Need help with how to get the ratings to save when entered by a user and then appear on the display ratings. I do have a database connected to the display rating but something is not connecting to the display? I followed the code exactly. Do i need to have a submit button? I also have 3 ratings on the same page ( a dynamic page) which then has over 600 different accounts that will need ratings.