Jump to content

[SOLVED] help im new to coding


myrickcomputers

Recommended Posts

to unset the cookie set it to a previous time mycookie refers to the name of your cookie

 

setcookie("mycookie","",time()-3600);

 

create a link to a php file with this code in it like

 

<a href="logout.php">logout</a>

 

Login.php

 

<?php
setcookie("mycookie","",time()-3600);

//load index page
header('Location: index.php');
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.