473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problems with session_destroy


Hi, I got a problem with session_destroy function
I created a script but it wont work, it goes like this:

<?php
session_start();
session_unset();
session_destroy();
header(location:index.php);
?>

I tried all means to find out but i couldnt, Id appreciate some help
thx

Joe

##-----------------------------------------------#
Article posted from PHP Freaks NewsGroup
http://www.phpfreaks.com/newsgroup
Get Addicted: comp.lang.ph
##-----------------------------------------------##
Jul 17 '05 #1
3 2019
ilandoni_at_montevideo_dot_com_dot_uy@fo (José Landoni) wrote in message news:<3p********************@giganews.com>...
Hi, I got a problem with session_destroy function
I created a script but it wont work, it goes like this:

<?php
session_start();
session_unset();
session_destroy();
header(location:index.php);
?>

I tried all means to find out but i couldnt, Id appreciate some help


Sorry, please be more specific. What problem? or what error? And
what OS and what PHP version, etc...

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2
a) what does your error output say?
b) try putting 'location:index.php' in quotes

ilandoni_at_montevideo_dot_com_dot_uy@fo (José Landoni) wrote in message news:<3p********************@giganews.com>...
Hi, I got a problem with session_destroy function
I created a script but it wont work, it goes like this:

<?php
session_start();
session_unset();
session_destroy();
header(location:index.php);
?>

I tried all means to find out but i couldnt, Id appreciate some help
thx

Joe
##-----------------------------------------------##
Article posted from PHP Freaks NewsGroups
http://www.phpfreaks.com/newsgroups
Get Addicted: comp.lang.php
##-----------------------------------------------##

Jul 17 '05 #3
José Landoni schrieb:
header(location:index.php);


You need a full domain qualifier and the correct Syntax:

header('Location: http://www.example.com/index.php');
exit;

Regards,
Matthias
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ken | last post by:
I am curious how others solve this problem. After storing the data from sessions in the database. How do you handle the session data stored on the server and cookie on the users computer. I...
2
by: Mat | last post by:
Hi, I'm trying to renew a session by using session_destroy() before starting a new session on the next page. Unfortunately, it seems that I keep getting the same SESSID (using $_REQUEST) when the...
3
by: Derek Fountain | last post by:
The documentation says session_destroy() "destroys all of the data associated with the current session". Um, like what? The docs further say that you should remove all information in the _SESSION...
6
by: Fire Juggler | last post by:
Hi guys, On my site, the members can upload photos to a selected gallery, the photos will go into the correct folder depending what gallery they click. This all works ok, accept wen it causes an...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
0
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.