Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Two Session - Login & Language
Old 09-11-2009, 04:57 AM Two Session - Login & Language
coldturkey's Avatar
Extreme Talker

Posts: 211
Name: Rachel
Location: Spain
Trades: 3
Hi,
I have two working codes, but for the site im doing at the moment I have to use both of them and its not going well.
I have two sessions (I have seen some people think two sessions is wrong, but im not sure how else to do it) Login and Language
Login:
PHP Code:
<?php 
include_once("custom_configuration.php");
include_once(
"auto_login.php");
if (
$_GET['action'] == "logout") {
  
setcookie("auto_login","",time()-5000); //Expire the invalid cookie.
  
$_SESSION['user_id'] = "";
  
$_SESSION['username'] = "";
  
$_SESSION['user_name'] = "";
}
?>
Language:
PHP Code:
<?php 
// Require the Session Functions
require("includes/functions/session.func.php");
// Call the SessionManagment function from session.func.php
SessionManagement();
// Require the Language File
require("includes/languages/".$_SESSION['Language'].".lang.php");
// Display a basic HTML page 
require_once('db_connect.php'); 
?>
I have used the login first at it works this way, but then my language does not change and i just dont know what to do....!
Can some one please help!
Rachel
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
 
Register now for full access!
Old 09-11-2009, 07:06 AM Re: Two Session - Login & Language
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You are probably reseting/restarting the sessions. maybe in the code we can't see.

You cannot have two sessions, there can be ONE session with several values in it BUT if you reset/restart sessiona the existing keys and values will be cleared
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Two Session - Login & Language
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.39666 seconds with 12 queries