473,803 Members | 3,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2037
ilandoni_at_mon tevideo_dot_com _dot_uy@fo (José Landoni) wrote in message news:<3p******* *************@g iganews.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_mon tevideo_dot_com _dot_uy@fo (José Landoni) wrote in message news:<3p******* *************@g iganews.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('Locatio n: 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
2262
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 know how to destroy the session data and remove the cookie, but how do you handle this problem. I see three possibilities:
2
3306
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 session starts again. I made a test page to simplify the problem and it still happens: <? session_start(); echo "SESSID = ".$_REQUEST;
3
6514
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 global with $_SESSION = array() and you should use setcookie() to set the session cookie to a blank value. Having done those, what does that leave session_destroy() to do? The page at http://au2.php.net/manual/en/function.session-destroy.php...
6
1327
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 error, like the file exists or not enough data has been entered. It is then redirected to the addphotos page, but this time it loses which folder it should go into. addphotos2.php
14
2326
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 going to use .Net......I highly recommend signing up for the free KBAlertz newsletter at http://www.kbalertz.com/default.aspx. Looking at all of the errors and quirks sometimes makes me wonder if this thing is really ready for prime time.
1
3052
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
8802
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) - DAYS(PROBLEMS.CLOSE_DATE)) = 365 AND PROBLEMS.CLOSE_DATE IS NOT NULL But this doesn't: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS
10
2416
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) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
0
2250
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 computer, the problem comes when the file is in a network drive. The most amazing thing is that in one computer I can execute my .Net program without problems independently if the file is
0
9565
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10550
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10317
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.