B. W. wrote
Try reading the next verse and note the context...
Php 2:12,13, Therefore, my beloved, as you have always obeyed, not as in my presence only, but now much more in my absence, work out your own salvation with fear and trembling; 13 for it is God who works in you both to will and to do for His good pleasure. NKJV
This is where some fall off track. People thinks works are unimportant and unnecessary. But in that statement they are only partly right but completely wrong at the same time.
First works are not things we are doing but things that God is doing through us. Not living in sin and doing right is done through the power of God. It really isn't us doing anything at all, but it is God working through us. We are not working to be saved but God is working through us because we are saved. As people we can't live right in and of our selves. It is God working through us and that is how we know we are saved.
Where you are right is if some one is doing right to be saved, then they are wrong and not really saved, but if God is working through someone and God is causing them to do right then they are saved and that is how they know they are.
We are not doing good works of our selves but God is doing them through us.
1Jn 2:3 And hereby we do know that we know him, if we keep his commandments.
1Jn 2:4 He that saith, I know him, and keepeth not his commandments, is a liar, and the truth is not in him.
1Jn 2:5 But whoso keepeth his word, in him verily is the love of God perfected: hereby know we that we are in him.
1Jn 2:6 He that saith he abideth in him ought himself also so to walk, even as he walked.
1Jn 2:29 If ye know that he is righteous, ye know that every one that doeth righteousness is born of him.
Jas 2:14 What doth it profit, my brethren, though a man say he hath faith, and have not works? can faith save him?
Jas 2:15 If a brother or sister be naked, and destitute of daily food,
Jas 2:16 And one of you say unto them, Depart in peace, be ye warmed and filled; notwithstanding ye give them not those things which are needful to the body; what doth it profit?
Jas 2:17 Even so faith, if it hath not works, is dead, being alone.
Jas 2:18 Yea, a man may say, Thou hast faith, and I have works: shew me thy faith without thy works, and I will shew thee my faith by my works.
Jas 2:19 Thou believest that there is one God; thou doest well: the devils also believe, and tremble.
Jas 2:20 But wilt thou know, O vain man, that faith without works is dead?