Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End if “certain” variable exist… do this.? Re: if “certain” variable exist… do this.?

#93638
noahgelman
Participant

You could even cut out the middle man and not use the $val if it’s not needed. Also, since you don’t want to do anything if it doesn’t equal hello, you won’t need the ‘else’ statement either.



if ($_GET == 'Hello') {
echo "this text";
// other code for people who know the secret word is "Hello"
}
?>