I tried add/removeslashes() but they do not seem to help. would appreciate an example. this is what I am trying to write:: $query='update our_guests set username ='.$userid.' where guest ID = '.$id; (something like that anyways): where $userid and $id are variables, and username is a field.