Re: [PHP-DB] Another question

2003-12-15 Thread Muhammed Mamedov
I see.

You use something like this right?

 header('WWW-Authenticate: Basic realm="My Realm"');
 header('HTTP/1.0 401 Unauthorized');

and of course want to get rid of PHP_AUTH_USER and PHP_AUTH_PW variables
which are then return.
Well..this is something different than the session. If you look at PHP
documentation these are represented as globals. So most probably you will
have to unset() them (using $Global['var_name'] maybe .?)


M.Mamedov

- Original Message - 
From: "Constantin Brinzoi" <[EMAIL PROTECTED]>
To: "Muhammed Mamedov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 15, 2003 4:13 PM
Subject: Re: [PHP-DB] Another question


> I destroy the session with:
> session_destroy()
>
> The file is deleted from the /tmp directory (which is good) but after
> that I want to go on another page (public space) and get rid of
> PHP_AUTH_USER and PHP_AUTH_PW.
>
> How can I do it?
>
> On Mon, 2003-12-15 at 16:10, Muhammed Mamedov wrote:
> > Could you provide the code you use for destroying your session?
> >
> > Because if you destroy it "session_unregister($session_name)" then no
need
> > for browser closing.
> > But if you don't destroy it, then it will be destroyed automatically
after
> > you close the browser.. this is how PHP works.
> >
> > Regards,
> > Muhammed.
> >
> >
> > ----- Original Message - 
> > From: "Constantin Brinzoi" <[EMAIL PROTECTED]>
> > To: "Muhammed Mamedov" <[EMAIL PROTECTED]>
> > Sent: Monday, December 15, 2003 4:05 PM
> > Subject: Re: [PHP-DB] Another question
> >
> >
> > > The reason is that I want to logout from the system.
> > > I destroyed the session but the session is still there!
> > > So I'm thinking of closing the window for good!
> > >
> > > Do you have any ideas how to make it work?
> > >
> > > Aurel.
> > >
> > > On Mon, 2003-12-15 at 15:25, Muhammed Mamedov wrote:
> > > > Really?
> > > > What is the reason for that?...
> > > >
> > > > Muhammed.
> > > >
> > > > - Original Message - 
> > > > From: "Duane Lakoduk" <[EMAIL PROTECTED]>
> > > > To: "'Constantin Brinzoi'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > > > Sent: Monday, December 15, 2003 3:17 PM
> > > > Subject: RE: [PHP-DB] Another question
> > > >
> > > >
> > > > >
> > > > > You can avoid the prompt when using javascript to close the window
if
> > you
> > > > > use this:
> > > > >
> > > > > function closeit(){
> > > > > window.opener = top;
> > > > > window.close();
> > > > > }
> > > > >
> > > > > Now, window will close without prompting.
> > > > >
> > > > > hth,
> > > > >
> > > > > Duane
> > > > > > -Original Message-
> > > > > > From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Monday, December 15, 2003 6:15 AM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: [PHP-DB] Another question
> > > > > >
> > > > > >
> > > > > > Is there a php function that closes a browser window?
> > > > > >
> > > > > > I know there is a javascript function (window.close), but I
> > > > > > can't use it
> > > > > > because it complains that the window is not opened by javascript
> > > > > > (window.open).
> > > > > >
> > > > > > I looked over the function reference but I didn't find anything
> > about
> > > > > > this problem.
> > > > > >
> > > > > > TIA
> > > > > > Constantin Brinzoi
> > > > > >
> > > > > >
> > > > >
> > > > > -- 
> > > > > PHP Database Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > >
> > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003
> > >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003

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



Re: [PHP-DB] Another question

2003-12-15 Thread Constantin Brinzoi
I destroy the session with:
session_destroy()

The file is deleted from the /tmp directory (which is good) but after
that I want to go on another page (public space) and get rid of
PHP_AUTH_USER and PHP_AUTH_PW.

How can I do it?

On Mon, 2003-12-15 at 16:10, Muhammed Mamedov wrote:
> Could you provide the code you use for destroying your session?
> 
> Because if you destroy it "session_unregister($session_name)" then no need
> for browser closing.
> But if you don't destroy it, then it will be destroyed automatically after
> you close the browser.. this is how PHP works.
> 
> Regards,
> Muhammed.
> 
> 
> - Original Message - 
> From: "Constantin Brinzoi" <[EMAIL PROTECTED]>
> To: "Muhammed Mamedov" <[EMAIL PROTECTED]>
> Sent: Monday, December 15, 2003 4:05 PM
> Subject: Re: [PHP-DB] Another question
> 
> 
> > The reason is that I want to logout from the system.
> > I destroyed the session but the session is still there!
> > So I'm thinking of closing the window for good!
> >
> > Do you have any ideas how to make it work?
> >
> > Aurel.
> >
> > On Mon, 2003-12-15 at 15:25, Muhammed Mamedov wrote:
> > > Really?
> > > What is the reason for that?...
> > >
> > > Muhammed.
> > >
> > > - Original Message - 
> > > From: "Duane Lakoduk" <[EMAIL PROTECTED]>
> > > To: "'Constantin Brinzoi'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Monday, December 15, 2003 3:17 PM
> > > Subject: RE: [PHP-DB] Another question
> > >
> > >
> > > >
> > > > You can avoid the prompt when using javascript to close the window if
> you
> > > > use this:
> > > >
> > > > function closeit(){
> > > > window.opener = top;
> > > > window.close();
> > > > }
> > > >
> > > > Now, window will close without prompting.
> > > >
> > > > hth,
> > > >
> > > > Duane
> > > > > -Original Message-
> > > > > From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> > > > > Sent: Monday, December 15, 2003 6:15 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: [PHP-DB] Another question
> > > > >
> > > > >
> > > > > Is there a php function that closes a browser window?
> > > > >
> > > > > I know there is a javascript function (window.close), but I
> > > > > can't use it
> > > > > because it complains that the window is not opened by javascript
> > > > > (window.open).
> > > > >
> > > > > I looked over the function reference but I didn't find anything
> about
> > > > > this problem.
> > > > >
> > > > > TIA
> > > > > Constantin Brinzoi
> > > > >
> > > > >
> > > >
> > > > -- 
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003
> >
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003

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



Re: [PHP-DB] Another question

2003-12-15 Thread Muhammed Mamedov
Could you provide the code you use for destroying your session?

Because if you destroy it "session_unregister($session_name)" then no need
for browser closing.
But if you don't destroy it, then it will be destroyed automatically after
you close the browser.. this is how PHP works.

Regards,
Muhammed.


- Original Message - 
From: "Constantin Brinzoi" <[EMAIL PROTECTED]>
To: "Muhammed Mamedov" <[EMAIL PROTECTED]>
Sent: Monday, December 15, 2003 4:05 PM
Subject: Re: [PHP-DB] Another question


> The reason is that I want to logout from the system.
> I destroyed the session but the session is still there!
> So I'm thinking of closing the window for good!
>
> Do you have any ideas how to make it work?
>
> Aurel.
>
> On Mon, 2003-12-15 at 15:25, Muhammed Mamedov wrote:
> > Really?
> > What is the reason for that?...
> >
> > Muhammed.
> >
> > - Original Message - 
> > From: "Duane Lakoduk" <[EMAIL PROTECTED]>
> > To: "'Constantin Brinzoi'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Monday, December 15, 2003 3:17 PM
> > Subject: RE: [PHP-DB] Another question
> >
> >
> > >
> > > You can avoid the prompt when using javascript to close the window if
you
> > > use this:
> > >
> > > function closeit(){
> > > window.opener = top;
> > > window.close();
> > > }
> > >
> > > Now, window will close without prompting.
> > >
> > > hth,
> > >
> > > Duane
> > > > -Original Message-
> > > > From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, December 15, 2003 6:15 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP-DB] Another question
> > > >
> > > >
> > > > Is there a php function that closes a browser window?
> > > >
> > > > I know there is a javascript function (window.close), but I
> > > > can't use it
> > > > because it complains that the window is not opened by javascript
> > > > (window.open).
> > > >
> > > > I looked over the function reference but I didn't find anything
about
> > > > this problem.
> > > >
> > > > TIA
> > > > Constantin Brinzoi
> > > >
> > > >
> > >
> > > -- 
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003

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



RE: [PHP-DB] Another question

2003-12-15 Thread Duane Lakoduk
This works because you have assigned a name to the .opener property which is
blank when you open a browser without script.  Script is now satisfied that
window was opened by script.

> -Original Message-
> From: Muhammed Mamedov [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 7:26 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Another question
>
>
> Really?
> What is the reason for that?...
>
> Muhammed.
>
> - Original Message -
> From: "Duane Lakoduk" <[EMAIL PROTECTED]>
> To: "'Constantin Brinzoi'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, December 15, 2003 3:17 PM
> Subject: RE: [PHP-DB] Another question
>
>
> >
> > You can avoid the prompt when using javascript to close the
> window if you
> > use this:
> >
> > function closeit(){
> > window.opener = top;
> > window.close();
> > }
> >
> > Now, window will close without prompting.
> >
> > hth,
> >
> > Duane
> > > -Original Message-
> > > From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, December 15, 2003 6:15 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DB] Another question
> > >
> > >
> > > Is there a php function that closes a browser window?
> > >
> > > I know there is a javascript function (window.close), but I
> > > can't use it
> > > because it complains that the window is not opened by javascript
> > > (window.open).
> > >
> > > I looked over the function reference but I didn't find
> anything about
> > > this problem.
> > >
> > > TIA
> > > Constantin Brinzoi
> > >
> > >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



RE: [PHP-DB] Another question

2003-12-15 Thread Duane Lakoduk
In I.E. 5.5 and newer. 

> -Original Message-
> From: Mike U. Petrov [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 7:32 AM
> To: [EMAIL PROTECTED]; 'Constantin Brinzoi'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Another question
> 
> 
> I've tried to use this function, but it doesn't work on IE 5.0
> On Opera 7.21 it works.
> So on what browser you've tested it?
> 
> Mike U. Petrov
> 
> 
> -Original Message-
> From: Duane Lakoduk [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 4:18 PM
> To: 'Constantin Brinzoi'; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Another question
> 
> 
> 
> You can avoid the prompt when using javascript to close the 
> window if you
> use this:
> 
> function closeit(){
>   window.opener = top;
>   window.close();
> }
> 
> Now, window will close without prompting.
> 
> hth,
> 
> Duane
> > -Original Message-----
> > From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 15, 2003 6:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] Another question
> >
> >
> > Is there a php function that closes a browser window?
> >
> > I know there is a javascript function (window.close), but I
> > can't use it
> > because it complains that the window is not opened by javascript
> > (window.open).
> >
> > I looked over the function reference but I didn't find 
> anything about
> > this problem.
> >
> > TIA
> > Constantin Brinzoi
> >
> >
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 

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



RE: [PHP-DB] Another question

2003-12-15 Thread Mike U. Petrov
I've tried to use this function, but it doesn't work on IE 5.0
On Opera 7.21 it works.
So on what browser you've tested it?

Mike U. Petrov


-Original Message-
From: Duane Lakoduk [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:18 PM
To: 'Constantin Brinzoi'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Another question



You can avoid the prompt when using javascript to close the window if you
use this:

function closeit(){
window.opener = top;
window.close();
}

Now, window will close without prompting.

hth,

Duane
> -Original Message-
> From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 6:15 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Another question
>
>
> Is there a php function that closes a browser window?
>
> I know there is a javascript function (window.close), but I
> can't use it
> because it complains that the window is not opened by javascript
> (window.open).
>
> I looked over the function reference but I didn't find anything about
> this problem.
>
> TIA
> Constantin Brinzoi
>
>

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

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



Re: [PHP-DB] Another question

2003-12-15 Thread Muhammed Mamedov
Really?
What is the reason for that?...

Muhammed.

- Original Message - 
From: "Duane Lakoduk" <[EMAIL PROTECTED]>
To: "'Constantin Brinzoi'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, December 15, 2003 3:17 PM
Subject: RE: [PHP-DB] Another question


> 
> You can avoid the prompt when using javascript to close the window if you
> use this:
> 
> function closeit(){
> window.opener = top;
> window.close();
> }
> 
> Now, window will close without prompting.
> 
> hth,
> 
> Duane
> > -Original Message-
> > From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 15, 2003 6:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] Another question
> >
> >
> > Is there a php function that closes a browser window?
> >
> > I know there is a javascript function (window.close), but I
> > can't use it
> > because it complains that the window is not opened by javascript
> > (window.open).
> >
> > I looked over the function reference but I didn't find anything about
> > this problem.
> >
> > TIA
> > Constantin Brinzoi
> >
> >
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.545 / Virus Database: 339 - Release Date: 27.11.2003

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



RE: [PHP-DB] Another question

2003-12-15 Thread Duane Lakoduk

You can avoid the prompt when using javascript to close the window if you
use this:

function closeit(){
window.opener = top;
window.close();
}

Now, window will close without prompting.

hth,

Duane
> -Original Message-
> From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 15, 2003 6:15 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Another question
>
>
> Is there a php function that closes a browser window?
>
> I know there is a javascript function (window.close), but I
> can't use it
> because it complains that the window is not opened by javascript
> (window.open).
>
> I looked over the function reference but I didn't find anything about
> this problem.
>
> TIA
> Constantin Brinzoi
>
>

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



RE: [PHP-DB] Another question

2003-12-15 Thread Mike U. Petrov
I think no. IMHO PHP can't have effect on user's programs. If I'm not right
correct me.
But window.close can close window opened not by javascript. It just ask user
is he want to close or no.

Mike U. Petrov
PHP-programmer.

-Original Message-
From: Constantin Brinzoi [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 3:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Another question


Is there a php function that closes a browser window?

I know there is a javascript function (window.close), but I can't use it
because it complains that the window is not opened by javascript
(window.open).

I looked over the function reference but I didn't find anything about
this problem.

TIA
Constantin Brinzoi

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

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



[PHP-DB] Another question

2003-12-15 Thread Constantin Brinzoi
Is there a php function that closes a browser window?

I know there is a javascript function (window.close), but I can't use it
because it complains that the window is not opened by javascript
(window.open).

I looked over the function reference but I didn't find anything about
this problem.

TIA
Constantin Brinzoi

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



[PHP-DB] Another Question

2003-10-06 Thread zxx10
Hi, All:

I have some information stored in the database.
When I try to show them, sometimes it give me the
following warning:

Warning: printf(): Too few arguments ...

Here is the problematic code:

printf("$des ");

I figured out that if there are "%" in the
string $des, it will give me this warning. But
I want to show "%" in the textarea. How can
I do that? Further, how to do the input filtering?
Are there any modules that I can use?

Thanks in advance for any help.

Zhan Xu
EECS Department
Case Western Reserver University
Email: [EMAIL PROTECTED]

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