Q:

adding mysql field to if statment

Anyone know why the below code isn't working
if($out['out'] = '$user')

I'm not sure how to do an if statment on a mysql field. 
Thanks

A:

Replace '=' with '==' and remove single quotation mark around $user: 
if($out['out'] == $user)

