[PHP] I'm not , log me out....

2001-10-27 Thread Andy Lewis

Hello All,

I'm trying to use php sessions to logout a user that may be sharing a
computer with another user.

In other words. I don't want user1 to access my site and then user2 be
able to access user1's account with an auto login because the session
was saved. 

I've seen a few sites that have a URL or button that a user can click on
such as: "I'm not Joe Smith, please log me out."

This is what I am trying to accomplish. Can someone point me in the right
direction? I have sessions implemented using username and password but, on
my login page since those vars are saved in the session the user
automatically gets logged in.

I also would like to have a checkbox on the login page that, if checked,
doesn't cache the username and password. So if they logout they must enter
a username and password, instead of getting automatically logged in.

Any help will be highly appreciated.

Andy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] multipart/form-data and Array POST

2004-03-13 Thread Andy Lewis
Hello All,
 
I'm having a problem including an array in a hidden field for file
upload.
 
My first question is, can this be done? Can I actually include an array
in a hidden field on a POSTed PHP upload field?
 
If so do I have to encode the array. I use array's on my site and am
aware that I have to encode them to pass the values
from page to page but, for some reason I can't pass them thru a
multipart/form-data form upload. The file gets uploaded
with no problem.
 
If this is not possible is there some other method that I can use to do
this?
 
My Code:
 



";
?>

 
Once the file is uploaded $my_array has no value. Is there some catch to
this?
 
 
Thanks in advance!
 
 
 
 
 
 


RE: [PHP] multipart/form-data and Array POST

2004-03-13 Thread Andy Lewis
I'm trying to pass an array of values. Then retrieve it on the next
page.

-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 13, 2004 9:58 AM
To: Andy Lewis
Cc: PHP Lists
Subject: Re: [PHP] multipart/form-data and Array POST


On Sat, 2004-03-13 at 10:40, Andy Lewis wrote:
>  
>  enctype="multipart/form-data">  type="file" size="60"> 
>  echo " base64_encode(serialize($my_array)) . "\">";
> ?>
> 
>  

What value are you trying to get from or place in "value" for the hidden
field?

-- 
Brian V Bonini <[EMAIL PROTECTED]>

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



RE: [PHP] multipart/form-data and Array POST

2004-03-13 Thread Andy Lewis
I am running:

 $my_array = unserialize(base64_decode($my_array));

on the array once it's POSTed.


-Original Message-
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 13, 2004 10:18 AM
To: Andy Lewis
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] multipart/form-data and Array POST


Andy Lewis wrote:

>Hello All,
> 
>I'm having a problem including an array in a hidden field for file 
>upload.
> 
>My first question is, can this be done? Can I actually include an array

>in a hidden field on a POSTed PHP upload field?
>  
>
can be done

> 
>If so do I have to encode the array. I use array's on my site and am 
>aware that I have to encode them to pass the values from page to page 
>but, for some reason I can't pass them thru a multipart/form-data form 
>upload. The file gets uploaded with no problem.
>  
>
You are posting to $PHP_SELF, are you sure you are not clobbering your 
$my_array variable  before you attempt to retrieve it's value? What is 
your register globals settings?

> 
> 
>My Code:
> 
>enctype="multipart/form-data"> type="file" size="60"> 
>echo "base64_encode(serialize($my_array)) . "\">";
>?>
>
>  
>
The code does not compile.



-- 
Raditha Dissanayake.
---
http://www.radinks.com/upload/ 
Drag and Drop Upload thousands of files and folders in a single
transfer.  (HTTP or FTP) 

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



RE: [PHP] multipart/form-data and Array POST

2004-03-13 Thread Andy Lewis
register_globals = On



-Original Message-
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 13, 2004 10:18 AM
To: Andy Lewis
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] multipart/form-data and Array POST


Andy Lewis wrote:

>Hello All,
> 
>I'm having a problem including an array in a hidden field for file 
>upload.
> 
>My first question is, can this be done? Can I actually include an array

>in a hidden field on a POSTed PHP upload field?
>  
>
can be done

> 
>If so do I have to encode the array. I use array's on my site and am 
>aware that I have to encode them to pass the values from page to page 
>but, for some reason I can't pass them thru a multipart/form-data form 
>upload. The file gets uploaded with no problem.
>  
>
You are posting to $PHP_SELF, are you sure you are not clobbering your 
$my_array variable  before you attempt to retrieve it's value? What is 
your register globals settings?

> 
> 
>My Code:
> 
>enctype="multipart/form-data"> type="file" size="60"> 
>echo "base64_encode(serialize($my_array)) . "\">";
>?>
>
>  
>
The code does not compile.



-- 
Raditha Dissanayake.
---
http://www.radinks.com/upload/ 
Drag and Drop Upload thousands of files and folders in a single
transfer.  (HTTP or FTP) 

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