I have a file with the following code block inside some of the page html:
<input name="appname" type="text" value="<?php Load('appname'); ?>" placeholder="Your App Name" />
which calls this function:
<?php
// Load cookie values
function Load($item) {
$item = strtolower($item);
if(!$_COOKIE['appsite_'.$item]) return null;
return $_COOKIE['appsite_'.$item];
}
?>
The function is at the top of the HTML file, the cookies are created but for some reason the code inside the input HTML markup is not being executed.
I can access the value of the cookie by doing the following just beneath the function:
$item = "appname";
echo $_COOKIE['w8appsite_'.$item];
It seems like the PHP code lower down the file is just not being executed?