I have the following IF statement:
If (!$upfile === "propertypics/"){
$upfile = 'propertypics/'.$userfile_name;
}else{
$upfile = "";
}
If $upfile IS equal to "propertypics/", I want it to NOT write the path and make $upfile blank. Otherwise, store the correct path in the variable $upfile.
When $upfile contains the value "propertypics/pic1.jpg", the IF statement is reading the "propertypics/" and assuming that it is a match.
i.e WHEN $upfile="propertypics/pic1.jpg"
The if statement checks to see if $upfile="propertypics/" and returns a true value. For some reason, it is matching only part of the value, not all of it.
Obviously it is not a match because there is more text there. How can I make it match EXACTLY what is in the variable $upfile?
(I have tried = and ==)