I am having trouble deleting a specific cookie in Chrome, debugger is not picking up anything at all, although this is the same code found in another SO thread
reset.php
<?php
session_start();
?>
<html>
<head>
<script type="text/javascript">
// Option 1 - set cookie to null
//$.cookie('welcome_<?php echo $_SESSION['myusername']; ?>', null);
// Option 2 - delete specific cookie
delete_cookie('welcome_<?php echo $_SESSION['myusername']; ?>');
// relocate back to index.php
window.location = 'index.php';
</script>
</head>
<body>
</body>
</html>
I have tried to both directly delete the cookie via delete_cookie
and also to set the cookie to null
, both without result.
I am not good with JavaScript, would appreciate if anyone could point me in the right direction. Must be something simple.
Thanks