I am trying to use an if statement to compare strings and it doesn't appear to be working. The format I am using is:

if (stringname = "value")
do this;

However this doesn't seem to work, unless I'm missing something it it looks like it pretty much ignores the if statement altogether despite ways I change it around. Any help would be appreciated.