How can I correct the problem I keep getting from the code below which states \'user_id\' in where clause is ambiguous. Thanks for the help in advance.
\'user_id\' in where clause is ambiguous
You simply need to specify which user_id to use, since both the user_info and user table have a field called user_id:
user_id
user_info
user
... WHERE user.user_id='$user_id'
SQL wouldn't tolerate this ambiguity, since for what it knows, both fields can represent totally different data.