There seems to be a confusion in the use of the words special chars. In the meaning of the PHP function htmlspecialchars, a special character is a less-than symbol (<), a greater-than symbol (>), ampersand (&) and possibly a single or double quote.
You should not apply htmlspecialchars when comparing a string with another normal string.
So, why not just:
$concert = $_GET["concert"];
if ($concert === "fanpass") {
// do one thing
} else if ($concert === "studentdiscount") {
// do another thing
} else {
// any other value
echo htmlspecialchars($concert);
// ...
}
Going by the variable names, it seems you want to use the concert parameter for something else, like a discount condition.
In that case you could start to use a new URL parameter, like for instance rate:
$concert = $_GET["concert"];
$rate = "(none)";
if (isset($_GET["discount"]) {
$rate = $_GET["discount"];
};
if ($rate === "fanpass") {
// do one thing
} else if ($rate === "studentdiscount") {
// do another thing
} else {
// any other value
// ...
}
echo "Your concert: {htmlspecialchars($concert)}<br>";
echo "Your rate: {htmlspecialchars($rate)}<br>";