PHP session not destroying or unsetting -


मेरे पास index.php में लॉगिन की जाँच के लिए यह निम्नलिखित PHP कोड है

  & lt; ? Php session_start (); $ Con = mysqli_connect ("***", "***", "***", "***"); $ Fbid_check = $ _ सत्र [ 'loginid_session']; $ Fbphoto_session = $ _ सत्र [ 'loginphoto_session']; $ Fbname_sql = mysqli_query ($ con, "चुनें fb_name से uni_users WHERE fb_id = '$ fbid_check'"); $ Name_fetch = mysqli_fetch_array ($ fbname_sql, MYSQLI_ASSOC); $ Fbname_session = $ name_fetch [ 'fb_name']; If (isset ($ fbname_session)) {हैडर ("स्थान: http://www.uniwink.com/landing/profile.php"); } Mysqli_close ($ con); ? & Gt;  

यह लॉगइन के लिए चेक करता है और प्रोफ़ाइल.फिप पर रीडायरेक्ट करता है जिसमें प्रवेश के लिए जाँच करने के लिए हैडर में निम्नलिखित PHP कोड होता है

  & lt; php $ con = Mysqli_connect ("****", "****", "****", "****"); session_start (); $ Fbid_check = $ _ सत्र [ 'loginid_session']; $ Fbphoto_session = $ _ सत्र [ 'loginphoto_session']; $ Fbname_sql = mysqli_query ($ con, "चुनें fb_name से uni_users WHERE fb_id = '$ fbid_check'"); $ Name_fetch = mysqli_fetch_array ($ fbname_sql, MYSQLI_ASSOC); $ Fbname_session = $ name_fetch [ 'fb_name']; यदि (! Isset ($ fbname_session)) {हैडर ("स्थान: http://www.uniwink.com/landing"); } Mysqli_close ($ con); ? & Gt;  

और मेरे पास यह निम्न logout.php है जिसे profile.php से कहा जाता है

  & lt;? Php session_start (); सेट नहीं ($ _ सत्र [ 'loginid_session']); सेट नहीं ($ fbname_session); session_destroy (); हैडर ("स्थान: http://www.uniwink.com/landing"); बाहर जाएं(); ? & Gt;  

समस्या लॉगआउट के बाद है, यह अभी भी profile.php में जाती है। ऐसा लगता है जैसे सत्र बिल्कुल भी नष्ट नहीं होता है। बात यह है कि वह कल तक ठीक से काम कर रही थी और अचानक सब कुछ हुआ था। धन्यवाद

सत्र की जांच करें।

  यदि (isset ($ _SESSION ['loginid_session'])) {हेडर ("स्थान: http://www.uniwink.com/landing/profile.php"); } और {हेडर ("स्थान: http://www.uniwink.com/landing"); }  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -