הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   מחיקת סשן (https://hosts.co.il/forums/showthread.php?t=35114)

LosNir 23-11-06 15:20

מחיקת סשן
 
שלום,
אני מנסה לעשות logout, ונתקלתי בבעיה,
אני משתמש בסשן (SESSION) ואני פשוט לא מצליח למחוק אותם, הינה הקוד:

PHP קוד:

session_destroy();
header("Location: index.php"); 

השגיאה:

קוד:


Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home/losnir/domains/nfs-il.net/public_html/1/login.php on line 5

Warning: Cannot modify header information - headers already sent by (output started at /home/losnir/domains/nfs-il.net/public_html/1/login.php:5) in /home/losnir/domains/nfs-il.net/public_html/1/login.php on line 6

יש לציין שאין שום פלט לפני זה.

תודה לעוזרים |כן|

LosNir 23-11-06 15:24

לא משנה,
שחכתי לשים לפני זה session_start();

תודה ל sUP שעזר לי, אפשר לנעול.


כל הזמנים הם GMT +2. הזמן כעת הוא 09:56.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ