[PHP] Session problem when setting session variables in files that are in different directories

2003-07-23 Thread Mikael Jansson
I am running PHP 4.3.0 on a WinXPpro machine and I recently got problem with
sessions.

What I am building is a loginsystem and I need to save some parameters in
session variables. This works fine on my Win2k pro machine but when I moved
it to winXP it creates two different sessions when I set the $_SESSION
variables. here is some psedo code:

1. When going to any page first thing is to check if permission is set and
also setting a session variable with the pagename (to use as an redirct
later on)
2. after setting the session variable an file is included that performs the
actual login or permission check. In this file another session variable is
set after the login is made, and now starts the weard thing, because now a
new sessionID will be created and if I look in the sessiondata directory
there will be 2 files (with different session ids) that has all the data I
have set but in 2 files.

The first session variable is set from a PHP file in one directory and then
the include file is in another directory and that seems to be the problem
because if I move the first PHP file into the include file directory it will
all work just fine.

Please say you have some comments on what the problem is.

Thanx in advance

/ Mikael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Problem with MySQL Query

2003-07-23 Thread Mikael Jansson
Hi Phil,
What I can see in your question there is a missing space between fieldname
"type" and the operator !=

I tested on my machine and it works fine when using both != and <>
operators, but it will not work with the NOT operator.

Hope the missing space will do some good.

br

/Mikael

"Phillip Blancher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Problem with mySQL Query
This is the query I have:

$dbqueryshipping1 = "select * from tempuserpurchase where
(usersessionid=\"$User_Shopping_Id\") and day=\"1\" and type!=\"Meal+Plans\"
";

What I want to do is to select everything from tempuserpurchase that matchs
the user session and the day, so long as type is not "Meal Plans"

However it is not excluding "Meal Plans"

Any Suggestions.

Thanks in advance,

Phil


__


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php