It looks like you may be misunderstanding the "direction" of rewriting here, and/or misunderstanding when and how mod_rewrite is invoked and acts.
Your PHP scripts or the database(s) that they use must be modified to generate and publish "friendly" URLs on your HTML pages.
You then add internal rewrite rules to detect and pass requests for those friendly URLs to your scripts for processing. This is an internal URL-to-filepath rewrite, such as the code shown here.
As an optional third step, you may wish to add a rule that redirects only direct client requests for "unfriendly" URLs (which are now only used as internal filepaths) to the corresponding "friendly" URL. This is an external URL-to-URL redirect, with the further requirement that it acts only on direct client requests, and not on the results of the previous internal URL-to-filepath rewrite.
See
this thread [webmasterworld.com] (and many others) in our Apache Forum Library.
The above code can be improved and optimized:
RewriteEngine On
RewriteRule ^([a-z]+)/?$ user.php?state=$1 [NC,L]
RewriteRule ^([0-9]+)/?$ user1.php?state2=$1 [L]
However, if you pass both trailing-slash and non-trailing slash requests to your scripts, then those scripts must "choose" one URL-format over the other (select a "canonical URL") and 301-redirect all requests for the other non-preferred format to the preferred format. If you don't wish to do that in your scripts, then you should add another 301-redirect rule to your .htaccess file to do it.
Jim