At 02:42 15.11.2002, Sascha Cunz said:
[snip]
This sounds like a pretty good idea to work around that problem :-)
Does this system work, if the user decides to split one session accross
multiple Browser-Windows, i.e. the uses the Open in new
I have some code that looks like this:
if(!session_is_registered('errors'))
session_register('errors');
but i want to do this using the $_SESSION, i tried
doing it this way
if(!isset($_SESSION['errors']))
session_register('errors');
but when i echo(isset($_SESSION['errors']))
Please, I' also have some question about $_SESSION.
Simple, how can we earse all $SESSION variable except one or two variables.
Beacuse i want to show some error message in my login form when login
failed. i want to destroy all other $_SESSION variable (about 10) except
$_SESSION['errmsg'] and
-Original Message-
From: Paonarong Buachaiyo [mailto:[EMAIL PROTECTED]]
Sent: 16 October 2002 09:04
To: [EMAIL PROTECTED]
Simple, how can we earse all $SESSION variable except one or
two variables.
Any way to do it except
unset($_SESSION['xx1']);
unset($_SESSION['xx2']);
Buachaiyo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 16, 2002 4:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] $_SESSION
Please, I' also have some question about $_SESSION.
Simple, how can we earse all $SESSION variable except one or two
variables.
Beacuse i want to show some error
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey,
Try:
- -
foreach ($_SESSION as $k = $v) {
if(($k != 'errmsg') ($k != 'errcount')) {
unset($_SESSION[$k]);
}
}
- -
HTH!
~Paul
On Wednesday 16 October 2002 04:04 am, Paonarong Buachaiyo wrote:
Hi All,
still trying to update old code. Am I using $_SESSION properly?
snip
if (mysql_num_rows($res) ==1){
/* If correct start session*/
session_start();
$_SESSION['SESSION_UNAME'];
$SESSION_UNAME = $user;
Instead of those two lines, use:
$_SESSION['SESSION_UNAME'] = $user;
Hi All,
still trying to update old code. Am I using $_SESSION properly?
snip
if (mysql_num_rows($res) ==1){
/* If correct start session*/
session_start();
$_SESSION['SESSION_UNAME'];
$SESSION_UNAME = $user;
header(Location: welcome.php);
mysql_free_result ($res);
John W. Holmes wrote:
Hi All,
still trying to update old code. Am I using $_SESSION properly?
snip
if (mysql_num_rows($res) ==1){
/* If correct start session*/
session_start();
$_SESSION['SESSION_UNAME'];
$SESSION_UNAME = $user;
header(Location: welcome.php);
mysql_free_result
try something like this:
if($_GET['newlang']) {
switch($_GET['newlang']){
case 'spanish':
$_SESSION['lang'] = contents_sp.php;
break;
case 'english':
$_SESSION['lang'] = contents_en.php;
break;
} elseif
Not realy understanding this:
then, somewhere on the page, add language links
$_SERVER['PHP_SELF'] . $_SERVER['QUERY_STRING'].
($_SERVER['QUERY_STRING'] ? 'newlang=sp' : '?newlang=sp')
$_SERVER['PHP_SELF'] . $_SERVER['QUERY_STRING'].
($_SERVER['QUERY_STRING'] ? 'newlang=en' : '?newlang=en')
that will make a link to the page you user is just viewing, only adding
'?newlang=SOMETHIG' if there is no query string (no get variables) or
'?newlang=SOMETHIG' if there a query string.
/index.php will become /index.php?newlang=en
/modules.php?name=News will become
Hello,
On Tuesday, October 01, 2002 11:13 PM
Subject: [PHP] $_SESSION only takes 1 character?
Tim Stoop wrote:
Hi there,
I've got some strange behaviour here (at least, I can't explain it). I'm
running PHP 4.2.3 on a Mandrake 9.0 machine. I'm using sessions in my
little app and want to use
My IP informed me that they have register_globals=on in their php.ini.
Is
this going to cause problems with my scripts that were written using
$_POST,
$_SESSION, etc?
If you can turn it off via, .htaccess, you'd be better. The scripts will
run fine with $_POST or whatever, but realize your
Thanks John,
I had been debating which IP Iwould use for my site. With the information
you've provided, I will use the one that has register_globals=off.
One re-write of all my code is enough. Besides, the purpose of the default
'off' behavior is precisely why I'm using $_SESSION's anyway.
Try with output buffering.
Regards,
Andrey Hristov
- Original Message -
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 6:20 PM
Subject: [PHP] $_SESSION - autostart, or session_start() ?
If I set the SESSION autostart = 1 in the PHP
The error is pretty self-explanatory. You aren't starting the session before
soemthing is being written to the page.
This will yeild the same error:
-top of document--
!-- BEGIN DOCUMENT
?php session_start(); ?
-botton of doc-
This is because something has been sent to
Call session_start() before ANY output. html is OUTPUT.
---John Holmes...
- Original Message -
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:20 AM
Subject: [PHP] $_SESSION - autostart, or session_start() ?
If I set the SESSION
I'm with you on this one! I'm working on transforming the website to use
the stuffs that will do the dirty work for me. Like $_SESSION, $_COOKIE,
etc. Found that this code is stored in the $_COOKIE. So, how cool!
FletchSOD
Kevin Stone [EMAIL PROTECTED] wrote in message
-Original Message-
From: Hiroshi Ayukawa [mailto:[EMAIL PROTECTED]]
Sent: 18 March 2002 05:11
I'm trying to use $_SESSION on Windows2000+PHP4.1.2 binary version.
But it seems that $_SESSION doesn't work, even in the
simplest samples
like;
I think this is acknowledged as broken
101 - 120 of 120 matches
Mail list logo