logout

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

infomorelos
New php-forum User
New php-forum User
Posts: 14
Joined: Mon Jan 27, 2003 12:10 am
Location: Cuernavaca, Mexico

logout

Postby infomorelos » Thu Feb 13, 2003 7:42 pm

I made a little php-page which is called after clicking a link on my main page:
<? php
session_start();
session_destroy();
echo 'thank you';
?>
Unfortunately, I get this message:
Parse error: parse error, unexpected T_STRING in /home/ahcehc/paginas/tecmilenio/logout.php on line 2
What do I miss here?

Thank you in advance

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Fri Feb 14, 2003 12:41 am

you have a space between the <? and php

infomorelos
New php-forum User
New php-forum User
Posts: 14
Joined: Mon Jan 27, 2003 12:10 am
Location: Cuernavaca, Mexico

no parse error anymore, but session isn't killed

Postby infomorelos » Fri Feb 14, 2003 1:25 am

Ok, I removed the space in the logout.php file:

<php
session_start();
session_destroy();
Header("Location: ../index.htm)
?>

This page is called from a link in a frame of a frameset with taget="_top" and the new location shows up. However, the Back-Button of my browser still works and gets me back into the protected area of my site. That is exactly what I want to avoid.
Maybe it is because I didn't put any 'session_start();' into the login file when entering the password protected area.

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Fri Feb 14, 2003 7:07 am

<?php
session_start();
session_destroy();
Header("Location: ../index.htm)
?>


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 3 guests

cron