<?php
/*if(isset($_COOKIE["telcoProvider"])) {
$telcoProvider = $_COOKIE["telcoProvider"];
} else {
$telcoProvider = "NOT FOUND";
}*/
$telcoProvider = isset($_COOKIE["telcoProvider"]) ? $_COOKIE["telcoProvider"] : "NOT FOUND".
print "<p>Your telecommunication company is <b>$telcoProvider.</b></p>";
?>
I have checked the browser and the Cookie is there.
It works with the normal if-else, but not with the ternary operator. It does not proceed to the print
, yet, it does not display any error either.
What am I missing?