is it possible to set a with javascript then read that cookie with
$_COOKIE all within <script language='JavaS cript'> tags for example:
<script language="JavaS cript">
function test(param) {
var expiration = new Date();
expiration.setS econds(expirati on.getSeconds + 30);
document.cookie = "kae=" + param + ";" + "expires=" +
expiration.toGM TString() + ";path=/;";
alert(' <?php echo ($_COOKIE['kae']); ?> ');
}
should this be working?
The alert box doesn't appear at all
Any help would be appreciated.
shagy :-)
$_COOKIE all within <script language='JavaS cript'> tags for example:
<script language="JavaS cript">
function test(param) {
var expiration = new Date();
expiration.setS econds(expirati on.getSeconds + 30);
document.cookie = "kae=" + param + ";" + "expires=" +
expiration.toGM TString() + ";path=/;";
alert(' <?php echo ($_COOKIE['kae']); ?> ');
}
should this be working?
The alert box doesn't appear at all
Any help would be appreciated.
shagy :-)
Comment