Jump to content

[SOLVED] help with short bit of code


starvator

Recommended Posts

what are you trying to do? I think the issue may be with the session I belive it should be in the format of  $_SESSION['example']="yes";

 

Also why use meta refresh instead of <?php header:location ?> ?

 

see: http://us3.php.net/session

http://www.w3schools.com/PHP/php_sessions.asp

 

<meta http-equiv="refresh" content="0;URL=index.php">

 

this doesnt work... i used a tutorial from http://nettuts.com/tutorials/php/user-membership-with-php/ but i cant seem to get the signout part to work...

 

WHAT I AM TRYING TO DO IS: make a script logout when redirected there...

 

I STILL GET THE ERROR: Parse error: syntax error, unexpected T_STRING in /home/a2638332/public_html/logout.php on line 2

<?php include "base.php"; $_SESSION = array(); session_destroy(); ?>
<meta http-equiv="refresh" content="0";"index.php">

 

YES! thank you! i just needed to put

<?php include "base.php"; $_SESSION = array(); session_destroy(); ?>
<meta http-equiv="refresh" content="0;URL=index.php">

 

A MIX OF 2 ANSWERS:D

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.