nasrajan / nutri-aid

Home Page:https://nutri-aid.000webhostapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Initial survey should save values

nasrajan opened this issue · comments

Initial survey should save values in the database. On clicking the submit button in the initial survey, the values should be saved to users_diet_preferences table. The table will save values in key-value pair format.
eg,
id | user_id | nutrition_name | nutrition_value
1 | 2 | water | 20
2 | 2 . | carbohydrate . | 10

ie, For the same user, there will be 6 entries in the table,each entry corresponding to one nutrition value.

If the user decides to skip the survey, a set of default values can be saved.